mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 02:06:43 +07:00
locks: Use inode_is_open_for_write
Use the aptly named function rather than open coding it. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Jeff Layton <jlayton@kernel.org>
This commit is contained in:
parent
7bbd1fc0e9
commit
052b8cfa40
@ -1766,7 +1766,7 @@ check_conflicting_open(const struct dentry *dentry, const long arg, int flags)
|
|||||||
if (flags & FL_LAYOUT)
|
if (flags & FL_LAYOUT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
|
if ((arg == F_RDLCK) && inode_is_open_for_write(inode))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
||||||
if ((arg == F_WRLCK) && ((d_count(dentry) > 1) ||
|
if ((arg == F_WRLCK) && ((d_count(dentry) > 1) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user