diff options
author | Ritesh Harjani <riteshh@linux.ibm.com> | 2020-05-10 11:54:50 +0530 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-06-03 23:16:52 -0400 |
commit | 9bee5779ee26d6debc84e0f1e4e54daa93f13ebc (patch) | |
tree | 9f9a7a5c0b39aea9168620eb79cba91767116190 /fs/ext4 | |
parent | eb2b8ebb867fa895d5c4768310998bc940f6506c (diff) | |
download | lwn-9bee5779ee26d6debc84e0f1e4e54daa93f13ebc.tar.gz lwn-9bee5779ee26d6debc84e0f1e4e54daa93f13ebc.zip |
ext4: balloc: use task_pid_nr() helper
Use task_pid_nr() function instead of current->pid.
There should be no functionality change in this patch.
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/4b58403e15e9c8deb34a1b93deb3fc9cd153ab84.1589086800.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/balloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index a32e5f7b5385..1ba46d87cdf1 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -903,10 +903,11 @@ ext4_fsblk_t ext4_inode_to_goal_block(struct inode *inode) return bg_start; if (bg_start + EXT4_BLOCKS_PER_GROUP(inode->i_sb) <= last_block) - colour = (current->pid % 16) * + colour = (task_pid_nr(current) % 16) * (EXT4_BLOCKS_PER_GROUP(inode->i_sb) / 16); else - colour = (current->pid % 16) * ((last_block - bg_start) / 16); + colour = (task_pid_nr(current) % 16) * + ((last_block - bg_start) / 16); return bg_start + colour; } |