diff options
author | Jeff Layton <jlayton@kernel.org> | 2021-06-09 20:09:52 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2021-06-29 00:15:52 +0200 |
commit | 7e65624d32b6e0429b1d3559e5585657f34f74a1 (patch) | |
tree | 65f0d6eb81fd2e14e9e1e7311dd82db4a04b0421 /fs/ceph/dir.c | |
parent | ceph: clean up locking annotation for ceph_get_snap_realm and __lookup_snap_r... (diff) | |
download | linux-7e65624d32b6e0429b1d3559e5585657f34f74a1.tar.xz linux-7e65624d32b6e0429b1d3559e5585657f34f74a1.zip |
ceph: allow ceph_put_mds_session to take NULL or ERR_PTR
...to simplify some error paths.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Luis Henriques <lhenriques@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 9ba79b6531fb..973489dafe91 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1809,8 +1809,7 @@ static void ceph_d_release(struct dentry *dentry) dentry->d_fsdata = NULL; spin_unlock(&dentry->d_lock); - if (di->lease_session) - ceph_put_mds_session(di->lease_session); + ceph_put_mds_session(di->lease_session); kmem_cache_free(ceph_dentry_cachep, di); } |