diff options
author | Sage Weil <sage@newdream.net> | 2009-12-21 20:40:34 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-23 08:17:14 -0800 |
commit | 5dacf09121ffb2e5fc7d15b78cae0b77042a1935 (patch) | |
tree | 8a4ec2fde459f93936a91644d024673d37347408 /fs/ceph/mds_client.h | |
parent | 7067f797b8409f1e10ec95ac2c1e17a200173d13 (diff) | |
download | op-kernel-dev-5dacf09121ffb2e5fc7d15b78cae0b77042a1935.zip op-kernel-dev-5dacf09121ffb2e5fc7d15b78cae0b77042a1935.tar.gz |
ceph: do not touch_caps while iterating over caps list
Avoid confusing iterate_session_caps(), flag the session while we are
iterating so that __touch_cap does not rearrange items on the list.
All other modifiers of session->s_caps do so under the protection of
s_mutex.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 41af5ca..b1c2025 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -114,6 +114,7 @@ struct ceph_mds_session { int s_num_cap_releases; struct list_head s_cap_releases; /* waiting cap_release messages */ struct list_head s_cap_releases_done; /* ready to send */ + bool s_iterating_caps; /* protected by mutex */ struct list_head s_cap_flushing; /* inodes w/ flushing caps */ |