Skip to content

Commit d331a41

Browse files
avatiMiklos Szeredi
authored andcommitted
fuse: invalidate inode attributes on xattr modification
Calls like setxattr and removexattr result in updation of ctime. Therefore invalidate inode attributes to force a refresh. Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: stable@vger.kernel.org
1 parent 4a4ac4e commit d331a41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/fuse/dir.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,8 @@ static int fuse_setxattr(struct dentry *entry, const char *name,
17491749
fc->no_setxattr = 1;
17501750
err = -EOPNOTSUPP;
17511751
}
1752+
if (!err)
1753+
fuse_invalidate_attr(inode);
17521754
return err;
17531755
}
17541756

@@ -1878,6 +1880,8 @@ static int fuse_removexattr(struct dentry *entry, const char *name)
18781880
fc->no_removexattr = 1;
18791881
err = -EOPNOTSUPP;
18801882
}
1883+
if (!err)
1884+
fuse_invalidate_attr(inode);
18811885
return err;
18821886
}
18831887

0 commit comments

Comments
 (0)