Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51308806 authored by Markus Elfring's avatar Markus Elfring Committed by Ilya Dryomov
Browse files

ceph: ENOMEM pr_err in __get_or_create_frag() is redundant



Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarYan, Zheng <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 397f2389
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -133,12 +133,9 @@ static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci,
	}

	frag = kmalloc(sizeof(*frag), GFP_NOFS);
	if (!frag) {
		pr_err("__get_or_create_frag ENOMEM on %p %llx.%llx "
		       "frag %x\n", &ci->vfs_inode,
		       ceph_vinop(&ci->vfs_inode), f);
	if (!frag)
		return ERR_PTR(-ENOMEM);
	}

	frag->frag = f;
	frag->split_by = 0;
	frag->mds = -1;