diff options
| author | Niels Dossche <[email protected]> | 2022-03-15 15:29:47 +0000 |
|---|---|---|
| committer | Ilya Dryomov <[email protected]> | 2022-04-25 08:45:15 +0000 |
| commit | 7f47f7f3b3c33fd2b4a662cd43cd1af96e1a297e (patch) | |
| tree | 90a305f1eeff65d108133db4cb7dcd0766a8e580 /fs/jbd2/commit.c | |
| parent | libceph: disambiguate cluster/pool full log message (diff) | |
| download | kernel-7f47f7f3b3c33fd2b4a662cd43cd1af96e1a297e.tar.gz kernel-7f47f7f3b3c33fd2b4a662cd43cd1af96e1a297e.zip | |
ceph: get snap_rwsem read lock in handle_cap_export for ceph_add_cap
ceph_add_cap says in its function documentation that the caller should
hold the read lock on the session snap_rwsem. Furthermore, not only
ceph_add_cap needs that lock, when it calls to ceph_lookup_snap_realm it
eventually calls ceph_get_snap_realm which states via lockdep that
snap_rwsem needs to be held. handle_cap_export calls ceph_add_cap
without that mdsc->snap_rwsem held. Thus, since ceph_get_snap_realm
and ceph_add_cap both need the lock, the common place to acquire that
lock is inside handle_cap_export.
Signed-off-by: Niels Dossche <[email protected]>
Reviewed-by: Xiubo Li <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
