]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix ceph_lookup_open intent usage
authorSage Weil <sage@newdream.net>
Tue, 26 Jul 2011 18:28:11 +0000 (11:28 -0700)
committerSage Weil <sage@newdream.net>
Tue, 26 Jul 2011 18:28:11 +0000 (11:28 -0700)
commitcfab76c3193eeaed36553cf44c6e830b5f223dea
treebeb059d860c2ca39cda9ca3aa45603025655e1a6
parent9b1dc86ac39a4ebad72221c2f1caa19d5808b52c
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>
fs/ceph/dir.c
fs/ceph/file.c
fs/ceph/super.h