summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorSage Weil2010-05-13 21:01:13 +0200
committerSage Weil2010-05-17 19:25:45 +0200
commitb4556396fac5b3f063d5b8ac54dc02f7612a75e1 (patch)
tree30f24bd81c4c007dd09fc625f202854803dd2628 /fs/ceph/mds_client.h
parentceph: clean up mds reply, error handling (diff)
downloadkernel-qcow2-linux-b4556396fac5b3f063d5b8ac54dc02f7612a75e1.tar.gz
kernel-qcow2-linux-b4556396fac5b3f063d5b8ac54dc02f7612a75e1.tar.xz
kernel-qcow2-linux-b4556396fac5b3f063d5b8ac54dc02f7612a75e1.zip
ceph: fix race between aborted requests and fill_trace
When we abort requests we need to prevent fill_trace et al from doing anything that relies on locks held by the VFS caller. This fixes a race between the reply handler and the abort code, ensuring that continue holding the dir mutex until the reply handler completes. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index 0b1dd10be39a..141a265bda75 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -165,6 +165,8 @@ struct ceph_mds_request {
struct inode *r_locked_dir; /* dir (if any) i_mutex locked by vfs */
struct inode *r_target_inode; /* resulting inode */
+ struct mutex r_fill_mutex;
+
union ceph_mds_request_args r_args;
int r_fmode; /* file mode, if expecting cap */