projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b259896
)
gfs2: Check for active reservation in gfs2_release
author
Andreas Gruenbacher
<agruenba@redhat.com>
Wed, 21 Oct 2020 14:37:54 +0000
(16:37 +0200)
committer
Andreas Gruenbacher
<agruenba@redhat.com>
Wed, 17 Feb 2021 18:26:05 +0000
(19:26 +0100)
In gfs2_release, check if the inode has an active reservation to avoid
unnecessary lock taking.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c
patch
|
blob
|
history
diff --git
a/fs/gfs2/file.c
b/fs/gfs2/file.c
index b39b339feddc934c39f58c1374695e98aeac32de..177c4d74ca3037cb9457a08fe48bc1837d05bc77 100644
(file)
--- a/
fs/gfs2/file.c
+++ b/
fs/gfs2/file.c
@@
-716,10
+716,10
@@
static int gfs2_release(struct inode *inode, struct file *file)
kfree(file->private_data);
file->private_data = NULL;
- if (
file->f_mode & FMODE_WRITE) {
+ if (
gfs2_rs_active(&ip->i_res))
gfs2_rs_delete(ip, &inode->i_writecount);
+ if (file->f_mode & FMODE_WRITE)
gfs2_qa_put(ip);
- }
return 0;
}