ceph: add ceph_change_snap_realm() helper
authorJeff Layton <jlayton@kernel.org>
Mon, 2 Aug 2021 15:01:26 +0000 (11:01 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 2 Sep 2021 20:49:17 +0000 (22:49 +0200)
commit0ba92e1c5f7ce7e9c1c828a84e873d7be51c1b9f
tree6820ef381dbcca7a789c4dcf8fb14968fb9b2485
parentc80dc3aee984c647d747bb07c108862effc917d8
ceph: add ceph_change_snap_realm() helper

Consolidate some fiddly code for changing an inode's snap_realm
into a new helper function, and change the callers to use it.

While we're in here, nothing uses the i_snap_realm_counter field, so
remove that from the inode.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Luis Henriques <lhenriques@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c
fs/ceph/inode.c
fs/ceph/snap.c
fs/ceph/super.h