[bug report] xfs: pass the goal of the incore inode walk to xfs_inode_walk()

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

 



Hello Darrick J. Wong,

The patch c809d7e948a1: "xfs: pass the goal of the incore inode walk
to xfs_inode_walk()" from Jun 1, 2021, leads to the following
Smatch static checker warning:

	fs/xfs/xfs_icache.c:52 xfs_icwalk_tag()
	warn: unsigned 'goal' is never less than zero.

fs/xfs/xfs_icache.c
    49 static inline unsigned int
    50 xfs_icwalk_tag(enum xfs_icwalk_goal goal)
    51 {
--> 52 	return goal < 0 ? XFS_ICWALK_NULL_TAG : goal;

This enum will be unsigned in GCC, so "goal" can't be negative.  Plus
we only pass 0-1 for goal (as far as Smatch can tell).

    53 }

regards,
dan carpenter



[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