diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 20:44:20 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 20:44:20 +0100 |
commit | 6b5567b1b21b0efc544b154dc023b7dd4b4dcf4c (patch) | |
tree | 49737aa9d6b50154c37ac9b2d6f6021b9eab61c1 /fs/gfs2/file.c | |
parent | ipv6/addrconf: ensure addrconf_verify_rtnl() has completed (diff) | |
parent | Merge tag 'net-5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
download | linux-6b5567b1b21b0efc544b154dc023b7dd4b4dcf4c.tar.xz linux-6b5567b1b21b0efc544b154dc023b7dd4b4dcf4c.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 3e718cfc19a7..8c39a8571b1f 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -704,10 +704,11 @@ static int gfs2_release(struct inode *inode, struct file *file) kfree(file->private_data); file->private_data = NULL; - if (gfs2_rs_active(&ip->i_res)) - gfs2_rs_delete(ip, &inode->i_writecount); - if (file->f_mode & FMODE_WRITE) + if (file->f_mode & FMODE_WRITE) { + if (gfs2_rs_active(&ip->i_res)) + gfs2_rs_delete(ip, &inode->i_writecount); gfs2_qa_put(ip); + } return 0; } |