mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 13:23:18 +00:00
ceph: fix a NULL vs IS_ERR() check when calling ceph_lookup_inode()
The ceph_lookup_inode() function returns error pointers. It never
returns NULL.
Fixes: aa87052dd9
("ceph: fix incorrectly showing the .snap size for stat")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
3a4e894f36
commit
f86a48667b
@ -2492,7 +2492,7 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path,
|
||||
struct inode *parent;
|
||||
|
||||
parent = ceph_lookup_inode(sb, ceph_ino(inode));
|
||||
if (!parent)
|
||||
if (IS_ERR(parent))
|
||||
return PTR_ERR(parent);
|
||||
|
||||
pci = ceph_inode(parent);
|
||||
|
Loading…
Reference in New Issue
Block a user