diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-20 20:00:09 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-09-06 19:56:51 +0200 |
commit | 51308806ff09eadc41726380891a393042919dd2 (patch) | |
tree | ed274437d4d0425c5d1e43fe50851029d63af4c0 | |
parent | 397f238994a5dae1b10e8a6efe9a2e2a95052cee (diff) |
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: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | fs/ceph/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 4c34e08e2d4f..087d9ea3a153 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -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; |