mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
fuse: remove unnecessary dentry_unhash on rmdir, dir rename
Fuse has no problems with references to unlinked directories. CC: Miklos Szeredi <miklos@szeredi.hu> CC: fuse-devel@lists.sourceforge.net Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
42b850b280
commit
526e7ce552
@ -667,8 +667,6 @@ static int fuse_rmdir(struct inode *dir, struct dentry *entry)
|
|||||||
if (IS_ERR(req))
|
if (IS_ERR(req))
|
||||||
return PTR_ERR(req);
|
return PTR_ERR(req);
|
||||||
|
|
||||||
dentry_unhash(entry);
|
|
||||||
|
|
||||||
req->in.h.opcode = FUSE_RMDIR;
|
req->in.h.opcode = FUSE_RMDIR;
|
||||||
req->in.h.nodeid = get_node_id(dir);
|
req->in.h.nodeid = get_node_id(dir);
|
||||||
req->in.numargs = 1;
|
req->in.numargs = 1;
|
||||||
@ -694,9 +692,6 @@ static int fuse_rename(struct inode *olddir, struct dentry *oldent,
|
|||||||
struct fuse_conn *fc = get_fuse_conn(olddir);
|
struct fuse_conn *fc = get_fuse_conn(olddir);
|
||||||
struct fuse_req *req = fuse_get_req(fc);
|
struct fuse_req *req = fuse_get_req(fc);
|
||||||
|
|
||||||
if (newent->d_inode && S_ISDIR(newent->d_inode->i_mode))
|
|
||||||
dentry_unhash(newent);
|
|
||||||
|
|
||||||
if (IS_ERR(req))
|
if (IS_ERR(req))
|
||||||
return PTR_ERR(req);
|
return PTR_ERR(req);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user