aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2007-10-17 02:31:04 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:43:04 -0400
commit819c4b3b4009275caae973691378235c177a1429 (patch)
treea959e68702db2359f52ffdf23644c3aa0be176ce /fs/fuse/file.c
parentebc14c4dbeb56195950058db9aa32de06c22de0d (diff)
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>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index f3ef2bde983b..c4b98c03a46e 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -71,11 +71,19 @@ static struct fuse_file *fuse_file_get(struct fuse_file *ff)
71 return ff; 71 return ff;
72} 72}
73 73
74static 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
74static void fuse_file_put(struct fuse_file *ff) 81static void fuse_file_put(struct fuse_file *ff)
75{ 82{
76 if (atomic_dec_and_test(&ff->count)) { 83 if (atomic_dec_and_test(&ff->count)) {
77 struct fuse_req *req = ff->reserved_req; 84 struct fuse_req *req = ff->reserved_req;
78 struct fuse_conn *fc = get_fuse_conn(req->dentry->d_inode); 85 struct fuse_conn *fc = get_fuse_conn(req->dentry->d_inode);
86 req->end = fuse_release_end;
79 request_send_background(fc, req); 87 request_send_background(fc, req);
80 kfree(ff); 88 kfree(ff);
81 } 89 }