提交 052b8cfa 编写于 作者: N Nikolay Borisov 提交者: Jeff Layton

locks: Use inode_is_open_for_write

Use the aptly named function rather than open coding it. No functional
changes.
Signed-off-by: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NJeff Layton <jlayton@kernel.org>
上级 7bbd1fc0
......@@ -1766,7 +1766,7 @@ check_conflicting_open(const struct dentry *dentry, const long arg, int flags)
if (flags & FL_LAYOUT)
return 0;
if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
if ((arg == F_RDLCK) && inode_is_open_for_write(inode))
return -EAGAIN;
if ((arg == F_WRLCK) && ((d_count(dentry) > 1) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册