summaryrefslogtreecommitdiffstats
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2009-04-28 16:56:36 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2009-04-28 16:56:36 +0200
commitb0be46ebf72ca7478c1c4bd0153c42f90e768a03 (patch)
tree1c86e5bf8a4d98b1ae00cedc70f51c78702ede3c /fs/fuse/file.c
parent6b2db28a7a2da1064df9e179d9b6d07b0bfe156a (diff)
downloadblackbird-op-linux-b0be46ebf72ca7478c1c4bd0153c42f90e768a03.tar.gz
blackbird-op-linux-b0be46ebf72ca7478c1c4bd0153c42f90e768a03.zip
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/fuse/file.c')
-rw-r--r--fs/fuse/file.c9
1 files changed, 4 insertions, 5 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)
static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req)
{
- dput(req->misc.release.dentry);
- mntput(req->misc.release.vfsmount);
+ path_put(&req->misc.release.path);
}
static void fuse_file_put(struct fuse_file *ff)
{
if (atomic_dec_and_test(&ff->count)) {
struct fuse_req *req = ff->reserved_req;
- struct inode *inode = req->misc.release.dentry->d_inode;
+ struct inode *inode = req->misc.release.path.dentry->d_inode;
struct fuse_conn *fc = get_fuse_conn(inode);
req->end = fuse_release_end;
fuse_request_send_background(fc, req);
@@ -177,8 +176,8 @@ int fuse_release_common(struct inode *inode, struct file *file, int isdir)
isdir ? FUSE_RELEASEDIR : FUSE_RELEASE);
/* Hold vfsmount and dentry until release is finished */
- req->misc.release.vfsmount = mntget(file->f_path.mnt);
- req->misc.release.dentry = dget(file->f_path.dentry);
+ path_get(&file->f_path);
+ req->misc.release.path = file->f_path;
spin_lock(&fc->lock);
list_del(&ff->write_entry);
OpenPOWER on IntegriCloud