fuse: fix attribute caching after rename
authorMiklos Szeredi <[email protected]>
Thu, 29 Nov 2007 00:22:03 +0000 (16:22 -0800)
committerLinus Torvalds <[email protected]>
Thu, 29 Nov 2007 17:24:54 +0000 (09:24 -0800)
Invalidate attributes on rename, since some filesystems may update
st_ctime.  Reported by Szabolcs Szakacsits

Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/fuse/dir.c

index dfc32dc97f7fd0d333e27c2b09b6e8fc4151f8ed..80d2f5292cf91f490532e903c0e37795e705de15 100644 (file)
@@ -657,6 +657,9 @@ static int fuse_rename(struct inode *olddir, struct dentry *oldent,
        err = req->out.h.error;
        fuse_put_request(fc, req);
        if (!err) {
+               /* ctime changes */
+               fuse_invalidate_attr(oldent->d_inode);
+
                fuse_invalidate_attr(olddir);
                if (olddir != newdir)
                        fuse_invalidate_attr(newdir);