On Tue, 2018-12-11 at 10:29 +0200, Nikolay Borisov wrote: > Use the aptly named function rather than open coding it. No functional > changes. > > Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx> > --- > fs/locks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/locks.c b/fs/locks.c > index 2ecb4db8c840..16ea7d89a67d 100644 > --- a/fs/locks.c > +++ b/fs/locks.c > @@ -1646,7 +1646,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) || Thanks, merged into locks-next. This should make v4.21. -- Jeff Layton <jlayton@xxxxxxxxxx>