projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bbd1fc
)
locks: Use inode_is_open_for_write
author
Nikolay Borisov
<nborisov@suse.com>
Tue, 11 Dec 2018 08:29:25 +0000
(10:29 +0200)
committer
Jeff Layton
<jlayton@kernel.org>
Mon, 17 Dec 2018 12:19:46 +0000
(07:19 -0500)
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>
fs/locks.c
patch
|
blob
|
history
diff --git
a/fs/locks.c
b/fs/locks.c
index
b6b4397
..
f0b24d9
100644
(file)
--- a/
fs/locks.c
+++ b/
fs/locks.c
@@
-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) ||