From: Anand Avati Date: Tue, 20 Aug 2013 06:21:07 +0000 (-0400) Subject: fuse: invalidate inode attributes on xattr modification X-Git-Tag: firefly_0821_release~6453^2~755 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eb97a45d12c9517b7846ebe3c97ee554b777ad34;p=firefly-linux-kernel-4.4.55.git fuse: invalidate inode attributes on xattr modification commit d331a415aef98717393dda0be69b7947da08eba3 upstream. Calls like setxattr and removexattr result in updation of ctime. Therefore invalidate inode attributes to force a refresh. Signed-off-by: Anand Avati Reviewed-by: Brian Foster Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 5b1274699b08..e1536f9ae809 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1753,6 +1753,8 @@ static int fuse_setxattr(struct dentry *entry, const char *name, fc->no_setxattr = 1; err = -EOPNOTSUPP; } + if (!err) + fuse_invalidate_attr(inode); return err; } @@ -1882,6 +1884,8 @@ static int fuse_removexattr(struct dentry *entry, const char *name) fc->no_removexattr = 1; err = -EOPNOTSUPP; } + if (!err) + fuse_invalidate_attr(inode); return err; }