Skip to content

Commit 5130880

Browse files
elfringidryomov
authored andcommitted
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 <[email protected]> Reviewed-by: Yan, Zheng <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 397f238 commit 5130880

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

fs/ceph/inode.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,9 @@ static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci,
133133
}
134134

135135
frag = kmalloc(sizeof(*frag), GFP_NOFS);
136-
if (!frag) {
137-
pr_err("__get_or_create_frag ENOMEM on %p %llx.%llx "
138-
"frag %x\n", &ci->vfs_inode,
139-
ceph_vinop(&ci->vfs_inode), f);
136+
if (!frag)
140137
return ERR_PTR(-ENOMEM);
141-
}
138+
142139
frag->frag = f;
143140
frag->split_by = 0;
144141
frag->mds = -1;

0 commit comments

Comments
 (0)