mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-31 03:24:29 +00:00
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
This commit is contained in:
commit
a28e0852d4
1 changed files with 3 additions and 1 deletions
|
@ -775,6 +775,7 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump,
|
||||||
start * sects_per_block,
|
start * sects_per_block,
|
||||||
nblocks * sects_per_block,
|
nblocks * sects_per_block,
|
||||||
GFP_NOFS,
|
GFP_NOFS,
|
||||||
|
BLKDEV_IFL_WAIT |
|
||||||
BLKDEV_IFL_BARRIER);
|
BLKDEV_IFL_BARRIER);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -785,7 +786,8 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump,
|
||||||
ret = blkdev_issue_discard(nilfs->ns_bdev,
|
ret = blkdev_issue_discard(nilfs->ns_bdev,
|
||||||
start * sects_per_block,
|
start * sects_per_block,
|
||||||
nblocks * sects_per_block,
|
nblocks * sects_per_block,
|
||||||
GFP_NOFS, BLKDEV_IFL_BARRIER);
|
GFP_NOFS,
|
||||||
|
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue