Skip to contentSkip to conversation

ceph: cleanup: remove dead code

PATCH Applied Dan Carpenter 2 participants 2 messages Mar 20, 2010 – Mar 21, 2010 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: cleanup: remove dead code

"xattr" is never NULL here. We took care of that in the previous if statement block.

fs/ceph/xattr.c +0 -6
index 37d6ce6..65b0e9b 100644
@@ -185,12 +185,6 @@ static int __set_xattr(struct ceph_inode_info *ci,
 		ci->i_xattrs.names_size -= xattr->name_len;
 		ci->i_xattrs.vals_size -= xattr->val_len;
 	}
-	if (!xattr) {
-		pr_err("__set_xattr ENOMEM on %p %llx.%llx xattr %s=%s\n",
-		       &ci->vfs_inode, ceph_vinop(&ci->vfs_inode), name,
-		       xattr->val);
-		return -ENOMEM;
-	}
 	ci->i_xattrs.names_size += name_len;
 	ci->i_xattrs.vals_size += val_len;
 	if (val)
Applied
#1 lore raw
Quoted 12 lines · Dan Carpenter

"xattr" is never NULL here. We took care of that in the previous if statement block.

fs/ceph/xattr.c +0 -0
index 37d6ce6..65b0e9b 100644
@@ -185,12 +185,6 @@ static int __set_xattr(struct ceph_inode_info *ci,
 		ci->i_xattrs.names_size -= xattr->name_len;
 		ci->i_xattrs.vals_size -= xattr->val_len;

fs/ceph/xattr.c static int __set_xattr(struct ceph_inode_info *ci, · line 190

Quoted 10 lines
fs/ceph/xattr.c +0 -6
 	}
-	if (!xattr) {
-		pr_err("__set_xattr ENOMEM on %p %llx.%llx xattr %s=%s\n",
-		       &ci->vfs_inode, ceph_vinop(&ci->vfs_inode), name,
-		       xattr->val);
-		return -ENOMEM;
-	}
 	ci->i_xattrs.names_size += name_len;
 	ci->i_xattrs.vals_size += val_len;
 	if (val)

Applied, thanks!
sage