Skip to contentSkip to conversation

xfs: delete unnecessary NULL checks

PATCH In review Dan Carpenter 2 participants 2 messages Jul 18, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: delete unnecessary NULL checks

These NULL check are no long needed after commit 2ed5b09b3e8f ("xfs:
make inode attribute forks a permanent part of struct xfs_inode").

---
 fs/xfs/libxfs/xfs_inode_fork.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/xfs/libxfs/xfs_inode_fork.c +1 -2
index 7c34184448e6..fa699f3792bf 100644
@@ -724,8 +724,7 @@ xfs_ifork_verify_local_attr(
 
 	if (fa) {
 		xfs_inode_verifier_error(ip, -EFSCORRUPTED, "attr fork",
-				ifp ? ifp->if_u1.if_data : NULL,
-				ifp ? ifp->if_bytes : 0, fa);
+				ifp->if_u1.if_data, ifp->if_bytes, fa);
 		return -EFSCORRUPTED;
 	}
 
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dan Carpenter

These NULL check are no long needed after commit 2ed5b09b3e8f ("xfs:
make inode attribute forks a permanent part of struct xfs_inode").

Looks correct,

--D

Quoted 21 lines
---
 fs/xfs/libxfs/xfs_inode_fork.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/xfs/libxfs/xfs_inode_fork.c +1 -2
index 7c34184448e6..fa699f3792bf 100644
@@ -724,8 +724,7 @@ xfs_ifork_verify_local_attr(
 
 	if (fa) {
 		xfs_inode_verifier_error(ip, -EFSCORRUPTED, "attr fork",
-				ifp ? ifp->if_u1.if_data : NULL,
-				ifp ? ifp->if_bytes : 0, fa);
+				ifp->if_u1.if_data, ifp->if_bytes, fa);
 		return -EFSCORRUPTED;
 	}
 
Signature · 1 line
2.35.1