]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: replace opencoded i_writecount usage with inode_is_open_for_write()
authorNikolay Borisov <nborisov@suse.com>
Mon, 11 Feb 2019 04:04:16 +0000 (23:04 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Feb 2019 04:04:16 +0000 (23:04 -0500)
commit62e492369e110c117f5399592eedd0b9fef06f5a
treeef381c696fc85b6d9c3cf555ca5d6a236c6e39de
parent9d0554699d6fabe90b22484c2ba63eee52423dea
ext4: replace opencoded i_writecount usage with inode_is_open_for_write()

There is a function which clearly conveys the objective of checking
i_writecount. Additionally the usage in ext4_mb_initialize_context was
wrong, since a node would have wrongfully been reported as writable if
i_writecount had a negative value (MMAP_DENY_WRITE).

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/ext4/inode.c
fs/ext4/mballoc.c