ceph: ENOMEM pr_err in __get_or_create_frag() is redundant
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 20 Aug 2017 18:00:09 +0000 (20:00 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 6 Sep 2017 17:56:51 +0000 (19:56 +0200)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/inode.c

index 4c34e08e2d4f4bb2033c44864daaa1664c32f996..087d9ea3a15324f29375e178f7b99f22cbcd126f 100644 (file)
@@ -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;