diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-28 10:56:36 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-28 10:56:36 -0400 |
commit | b0be46ebf72ca7478c1c4bd0153c42f90e768a03 (patch) | |
tree | 1c86e5bf8a4d98b1ae00cedc70f51c78702ede3c /fs | |
parent | 6b2db28a7a2da1064df9e179d9b6d07b0bfe156a (diff) |
fuse: use struct path in release structure
Use struct path instead of separate dentry and vfsmount in
req->misc.release.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/file.c | 9 | ||||
-rw-r--r-- | fs/fuse/fuse_i.h | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 028e17decf2f..3c8fa93524b0 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -86,15 +86,14 @@ static struct fuse_file *fuse_file_get(struct fuse_file *ff) | |||
86 | 86 | ||
87 | static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req) | 87 | static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req) |
88 | { | 88 | { |
89 | dput(req->misc.release.dentry); | 89 | path_put(&req->misc.release.path); |
90 | mntput(req->misc.release.vfsmount); | ||
91 | } | 90 | } |
92 | 91 | ||
93 | static void fuse_file_put(struct fuse_file *ff) | 92 | static void fuse_file_put(struct fuse_file *ff) |
94 | { | 93 | { |
95 | if (atomic_dec_and_test(&ff->count)) { | 94 | if (atomic_dec_and_test(&ff->count)) { |
96 | struct fuse_req *req = ff->reserved_req; | 95 | struct fuse_req *req = ff->reserved_req; |
97 | struct inode *inode = req->misc.release.dentry->d_inode; | 96 | struct inode *inode = req->misc.release.path.dentry->d_inode; |
98 | struct fuse_conn *fc = get_fuse_conn(inode); | 97 | struct fuse_conn *fc = get_fuse_conn(inode); |
99 | req->end = fuse_release_end; | 98 | req->end = fuse_release_end; |
100 | fuse_request_send_background(fc, req); | 99 | fuse_request_send_background(fc, req); |
@@ -177,8 +176,8 @@ int fuse_release_common(struct inode *inode, struct file *file, int isdir) | |||
177 | isdir ? FUSE_RELEASEDIR : FUSE_RELEASE); | 176 | isdir ? FUSE_RELEASEDIR : FUSE_RELEASE); |
178 | 177 | ||
179 | /* Hold vfsmount and dentry until release is finished */ | 178 | /* Hold vfsmount and dentry until release is finished */ |
180 | req->misc.release.vfsmount = mntget(file->f_path.mnt); | 179 | path_get(&file->f_path); |
181 | req->misc.release.dentry = dget(file->f_path.dentry); | 180 | req->misc.release.path = file->f_path; |
182 | 181 | ||
183 | spin_lock(&fc->lock); | 182 | spin_lock(&fc->lock); |
184 | list_del(&ff->write_entry); | 183 | list_del(&ff->write_entry); |
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 6fc5aedaa0d5..146317ff81b9 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -248,8 +248,7 @@ struct fuse_req { | |||
248 | struct fuse_forget_in forget_in; | 248 | struct fuse_forget_in forget_in; |
249 | struct { | 249 | struct { |
250 | struct fuse_release_in in; | 250 | struct fuse_release_in in; |
251 | struct vfsmount *vfsmount; | 251 | struct path path; |
252 | struct dentry *dentry; | ||
253 | } release; | 252 | } release; |
254 | struct fuse_init_in init_in; | 253 | struct fuse_init_in init_in; |
255 | struct fuse_init_out init_out; | 254 | struct fuse_init_out init_out; |