summaryrefslogtreecommitdiffstats
path: root/fs/notify/fanotify
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-12-11 10:27:23 +0200
committerJan Kara <jack@suse.cz>2018-12-11 10:55:45 +0100
commitac9498d6864495c3e5e4439300111d7b61a35fea (patch)
treeb8ff4fbba0f0c52e083efd764f17df00dcbe39e6 /fs/notify/fanotify
parent5b03a472b4e39c4e107d29543fd968c8abc3c873 (diff)
downloadblackbird-op-linux-ac9498d6864495c3e5e4439300111d7b61a35fea.tar.gz
blackbird-op-linux-ac9498d6864495c3e5e4439300111d7b61a35fea.zip
fanotify: Use inode_is_open_for_write
Use the aptly named function rather than opencoding i_writecount check. No functional changes. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fanotify')
-rw-r--r--fs/notify/fanotify/fanotify_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index d9484a0ac6b3..9c870b0d2b56 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -675,7 +675,7 @@ static int fanotify_add_inode_mark(struct fsnotify_group *group,
*/
if ((flags & FAN_MARK_IGNORED_MASK) &&
!(flags & FAN_MARK_IGNORED_SURV_MODIFY) &&
- (atomic_read(&inode->i_writecount) > 0))
+ inode_is_open_for_write(inode))
return 0;
return fanotify_add_mark(group, &inode->i_fsnotify_marks,
OpenPOWER on IntegriCloud