diff options
author | Sage Weil <sage@newdream.net> | 2011-05-24 16:06:07 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-26 07:26:48 -0400 |
commit | e4eaac06bcccb2a70bca6a2de9871882dce2aa14 (patch) | |
tree | ca6736d96294cd6e65a1c3055718bfd5adc7336e /fs/fuse/dir.c | |
parent | 79bf7c732b5ff75b96022ed9d29181afd3d2509c (diff) |
vfs: push dentry_unhash on rename_dir into file systems
Only a few file systems need this. Start by pushing it down into each
rename method (except gfs2 and xfs) so that it can be dealt with on a
per-fs basis.
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 40d5c2ae4e73..e462a7a281bf 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -693,6 +693,10 @@ static int fuse_rename(struct inode *olddir, struct dentry *oldent, | |||
693 | struct fuse_rename_in inarg; | 693 | struct fuse_rename_in inarg; |
694 | struct fuse_conn *fc = get_fuse_conn(olddir); | 694 | struct fuse_conn *fc = get_fuse_conn(olddir); |
695 | struct fuse_req *req = fuse_get_req(fc); | 695 | struct fuse_req *req = fuse_get_req(fc); |
696 | |||
697 | if (newent->d_inode && S_ISDIR(newent->d_inode->i_mode)) | ||
698 | dentry_unhash(newent); | ||
699 | |||
696 | if (IS_ERR(req)) | 700 | if (IS_ERR(req)) |
697 | return PTR_ERR(req); | 701 | return PTR_ERR(req); |
698 | 702 | ||