mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
ovl: respect FIEMAP_FLAG_SYNC flag
Stacked overlayfs fiemap operation broke xfstests that test delayed
allocation (with "_test_generic_punch -d"), because ovl_fiemap()
failed to write dirty pages when requested.
Fixes: 9e142c4102 ("ovl: add ovl_fiemap()")
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
This commit is contained in:
1 parent
5b394b2ddf
commit
80d3481081
1 file changed
+4
@@ -467,6 +467,10 @@ static int ovl_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
old_cred = ovl_override_creds(inode->i_sb);
|
||||
|
||||
if (fieinfo->fi_flags & FIEMAP_FLAG_SYNC)
|
||||
filemap_write_and_wait(realinode->i_mapping);
|
||||
|
||||
err = realinode->i_op->fiemap(realinode, fieinfo, start, len);
|
||||
revert_creds(old_cred);
|
||||
|
||||
|
||||
Reference in new issue
Block a user