summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-22 09:44:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-22 09:44:47 -0700
commita28e0852d45e65d9edf249c36e432b5e0a80f01d (patch)
treeb19f4725757252eb070157b06765235138384813 /fs
parente36c886a0f9d624377977fa6cae309cfd7f362fa (diff)
parent1cb0c924fa2d616e5e3b5bc62d97191aac9ff442 (diff)
downloadlinux-stable-a28e0852d45e65d9edf249c36e432b5e0a80f01d.tar.gz
linux-stable-a28e0852d45e65d9edf249c36e432b5e0a80f01d.tar.bz2
linux-stable-a28e0852d45e65d9edf249c36e432b5e0a80f01d.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: nilfs2: wait for discard to finish
Diffstat (limited to 'fs')
-rw-r--r--fs/nilfs2/the_nilfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index 6af1c0073e9e..4317f177ea7c 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -775,6 +775,7 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump,
start * sects_per_block,
nblocks * sects_per_block,
GFP_NOFS,
+ BLKDEV_IFL_WAIT |
BLKDEV_IFL_BARRIER);
if (ret < 0)
return ret;
@@ -785,7 +786,8 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump,
ret = blkdev_issue_discard(nilfs->ns_bdev,
start * sects_per_block,
nblocks * sects_per_block,
- GFP_NOFS, BLKDEV_IFL_BARRIER);
+ GFP_NOFS,
+ BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
return ret;
}