df35fdc42aa24ed4aaea05358351779fe810722e Issues on fs/inode.c file . fs/inode.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 69b8b52..b9e0965 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -81,7 +81,7 @@ static long get_nr_inodes(void) long sum = 0; for_each_possible_cpu(i) sum += per_cpu(nr_inodes, i); - return sum < 0 ? 0 : sum; + return (sum < 0) ? 0 : sum; } static inline long get_nr_inodes_unused(void) @@ -90,14 +90,14 @@ static inline long get_nr_inodes_unused(void) long sum = 0; for_each_possible_cpu(i) sum += per_cpu(nr_unused, i); - return sum < 0 ? 0 : sum; + return (sum < 0) ? 0 : sum; } long get_nr_dirty_inodes(void) { /* not actually dirty inodes, but a wild approximation */ long nr_dirty = get_nr_inodes() - get_nr_inodes_unused(); - return nr_dirty > 0 ? nr_dirty : 0; + return (nr_dirty > 0) ? nr_dirty : 0; } /* @@ -238,9 +238,9 @@ void __destroy_inode(struct inode *inode) } #ifdef CONFIG_FS_POSIX_ACL - if (inode->i_acl && inode->i_acl != ACL_NOT_CACHED) + if (inode->i_acl && (inode->i_acl != ACL_NOT_CACHED)) posix_acl_release(inode->i_acl); - if (inode->i_default_acl && inode->i_default_acl != ACL_NOT_CACHED) + if (inode->i_default_acl && (inode->i_default_acl != ACL_NOT_CACHED)) posix_acl_release(inode->i_default_acl); #endif this_cpu_dec(nr_inodes); @@ -412,7 +412,7 @@ void inode_add_lru(struct inode *inode) { if (!(inode->i_state & (I_DIRTY_ALL | I_SYNC | I_FREEING | I_WILL_FREE)) && - !atomic_read(&inode->i_count) && inode->i_sb->s_flags & MS_ACTIVE) + !atomic_read(&inode->i_count) && (inode->i_sb->s_flags & MS_ACTIVE)) inode_lru_list_add(inode); } @@ -452,7 +452,7 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval) tmp = (hashval * (unsigned long)sb) ^ (GOLDEN_RATIO_PRIME + hashval) / L1_CACHE_BYTES; tmp = tmp ^ ((tmp ^ GOLDEN_RATIO_PRIME) >> i_hash_shift); - return tmp & i_hash_mask; + return (tmp & i_hash_mask); } /** @@ -973,7 +973,7 @@ void lock_two_nondirectories(struct inode *inode1, struct inode *inode2) if (inode1 && !S_ISDIR(inode1->i_mode)) inode_lock(inode1); - if (inode2 && !S_ISDIR(inode2->i_mode) && inode2 != inode1) + if (inode2 && !S_ISDIR(inode2->i_mode) && (inode2 != inode1)) inode_lock_nested(inode2, I_MUTEX_NONDIR2); } EXPORT_SYMBOL(lock_two_nondirectories); @@ -987,7 +987,7 @@ void unlock_two_nondirectories(struct inode *inode1, struct inode *inode2) { if (inode1 && !S_ISDIR(inode1->i_mode)) inode_unlock(inode1); - if (inode2 && !S_ISDIR(inode2->i_mode) && inode2 != inode1) + if (inode2 && !S_ISDIR(inode2->i_mode) && (inode2 != inode1)) inode_unlock(inode2); } EXPORT_SYMBOL(unlock_two_nondirectories); @@ -1147,7 +1147,7 @@ static int test_inode_iunique(struct super_block *sb, unsigned long ino) spin_lock(&inode_hash_lock); hlist_for_each_entry(inode, b, i_hash) { - if (inode->i_ino == ino && inode->i_sb == sb) { + if ((inode->i_ino == ino) && (inode->i_sb == sb)) { spin_unlock(&inode_hash_lock); return 0; } @@ -1558,7 +1558,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, * Is the previous atime value older than a day? If yes, * update atime: */ - if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= 24*60*60) + if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= (24*60*60)) return 1; /* * Good, we can skip the atime update: -- 2.7.4