提交 ac9498d6 编写于 作者: N Nikolay Borisov 提交者: Jan Kara

fanotify: Use inode_is_open_for_write

Use the aptly named function rather than opencoding i_writecount check.
No functional changes.
Reviewed-by: NJan Kara <jack@suse.cz>
Signed-off-by: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 5b03a472
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册