[PATCH 1/2] xfs: Fix compiler warning in xfs_attr_node_removename_setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix compiler warning for variable 'blk' set but not used in
xfs_attr_node_removename_setup

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Allison Collins <allison.henderson@xxxxxxxxxx>
---
 fs/xfs/libxfs/xfs_attr.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index d4583a0..4ef0020 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -1181,8 +1181,11 @@ int xfs_attr_node_removename_setup(
 		return error;
 
 	blk = &(*state)->path.blk[(*state)->path.active - 1];
-	ASSERT(blk->bp != NULL);
-	ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC);
+	if (blk->bp == NULL)
+		return -EFSCORRUPTED;
+
+	if (blk->magic != XFS_ATTR_LEAF_MAGIC)
+		return -EFSCORRUPTED;
 
 	if (args->rmtblkno > 0) {
 		error = xfs_attr_leaf_mark_incomplete(args, *state);
-- 
2.7.4




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux