diff options
author | Theodore Ts'o <tytso@mit.edu> | 2021-08-14 16:41:30 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-08-31 05:36:50 +0200 |
commit | a5fda11338180db13f3e9eec20c9deda1f7bad72 (patch) | |
tree | f8124d2048cf6b350e4778757b414658c2487c67 /fs/ext4/ext4_extents.h | |
parent | ext4: Make sure quota files are not grabbed accidentally (diff) | |
download | linux-a5fda11338180db13f3e9eec20c9deda1f7bad72.tar.xz linux-a5fda11338180db13f3e9eec20c9deda1f7bad72.zip |
ext4: fix sparse warnings
Add sparse annotations to suppress false positive context imbalance
warnings, and use NULL instead of 0 in EXT_MAX_{EXTENT,INDEX}.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_extents.h')
-rw-r--r-- | fs/ext4/ext4_extents.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/ext4_extents.h b/fs/ext4/ext4_extents.h index 44e59881a1f0..26435f3a3094 100644 --- a/fs/ext4/ext4_extents.h +++ b/fs/ext4/ext4_extents.h @@ -173,10 +173,11 @@ struct partial_cluster { #define EXT_MAX_EXTENT(__hdr__) \ ((le16_to_cpu((__hdr__)->eh_max)) ? \ ((EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)) \ - : 0) + : NULL) #define EXT_MAX_INDEX(__hdr__) \ ((le16_to_cpu((__hdr__)->eh_max)) ? \ - ((EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)) : 0) + ((EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)) \ + : NULL) static inline struct ext4_extent_header *ext_inode_hdr(struct inode *inode) { |