aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-07-26 14:28:11 -0400
committerSage Weil <sage@newdream.net>2011-07-26 14:28:11 -0400
commit468640e32c7f6bfdaaa011095cc388786755d159 (patch)
treebeb059d860c2ca39cda9ca3aa45603025655e1a6 /fs/ceph/super.h
parent9bae113a085b790de384bf86f09e15b42a65a985 (diff)
ceph: fix ceph_lookup_open intent usage
We weren't properly calling lookup_instantiate_filp when setting up the lookup intent, which could lead to file leakage on errors. So: - use separate helper for the hidden snapdir translation, immediately following the mds request - use ceph_finish_lookup for the final dentry/return value dance in the exit path - lookup_instantiate_filp on success Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index a8a273320241..c24891a5bec2 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -791,6 +791,8 @@ extern const struct dentry_operations ceph_dentry_ops, ceph_snap_dentry_ops,
791 ceph_snapdir_dentry_ops; 791 ceph_snapdir_dentry_ops;
792 792
793extern int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry); 793extern int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry);
794extern int ceph_handle_snapdir(struct ceph_mds_request *req,
795 struct dentry *dentry, int err);
794extern struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, 796extern struct dentry *ceph_finish_lookup(struct ceph_mds_request *req,
795 struct dentry *dentry, int err); 797 struct dentry *dentry, int err);
796 798