diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/dev.c | 2 | ||||
-rw-r--r-- | fs/fuse/file.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index de25bff31420..c78f60e1ba5d 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -231,8 +231,6 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
231 | fc->num_background--; | 231 | fc->num_background--; |
232 | } | 232 | } |
233 | spin_unlock(&fc->lock); | 233 | spin_unlock(&fc->lock); |
234 | dput(req->dentry); | ||
235 | mntput(req->vfsmount); | ||
236 | wake_up(&req->waitq); | 234 | wake_up(&req->waitq); |
237 | if (end) | 235 | if (end) |
238 | end(fc, req); | 236 | end(fc, req); |
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 | ||
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 | static void fuse_file_put(struct fuse_file *ff) | 81 | static 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 | } |