Commit 819c4b3b4009275caae973691378235c177a1429
Committed by
Linus Torvalds
1 parent
ebc14c4dbe
fuse: cleanup in release
Move dput/mntput pair from request_end() to fuse_release_end(), because there's no other place they are used. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 8 additions and 2 deletions Side-by-side Diff
fs/fuse/dev.c
fs/fuse/file.c
... | ... | @@ -71,11 +71,19 @@ |
71 | 71 | return ff; |
72 | 72 | } |
73 | 73 | |
74 | +static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req) | |
75 | +{ | |
76 | + dput(req->dentry); | |
77 | + mntput(req->vfsmount); | |
78 | + fuse_put_request(fc, req); | |
79 | +} | |
80 | + | |
74 | 81 | static void fuse_file_put(struct fuse_file *ff) |
75 | 82 | { |
76 | 83 | if (atomic_dec_and_test(&ff->count)) { |
77 | 84 | struct fuse_req *req = ff->reserved_req; |
78 | 85 | struct fuse_conn *fc = get_fuse_conn(req->dentry->d_inode); |
86 | + req->end = fuse_release_end; | |
79 | 87 | request_send_background(fc, req); |
80 | 88 | kfree(ff); |
81 | 89 | } |