]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fuse: invalidate inode attributes on xattr modification
authorAnand Avati <avati@redhat.com>
Tue, 20 Aug 2013 06:21:07 +0000 (02:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 23:52:53 +0000 (16:52 -0700)
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 <avati@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c

index c04a025c677f56edc39c4b389ff8539f47eca2f0..607a9736c951c2c49e86ff2d46685ddf9ee13f70 100644 (file)
@@ -1439,6 +1439,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;
 }
 
@@ -1568,6 +1570,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;
 }