projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b31395
)
ext4: fix bh ref count on error paths
author
Zhaolong Zhang
<zhangzl2013@126.com>
Tue, 2 Mar 2021 09:42:31 +0000
(17:42 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 13:00:03 +0000
(15:00 +0200)
[ Upstream commit
c915fb80eaa6194fa9bd0a4487705cd5b0dda2f1
]
__ext4_journalled_writepage should drop bhs' ref count on error paths
Signed-off-by: Zhaolong Zhang <zhangzl2013@126.com>
Link:
https://lore.kernel.org/r/1614678151-70481-1-git-send-email-zhangzl2013@126.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/inode.c
patch
|
blob
|
history
diff --git
a/fs/ext4/inode.c
b/fs/ext4/inode.c
index
c2b8ba3
..
3f11c94
100644
(file)
--- a/
fs/ext4/inode.c
+++ b/
fs/ext4/inode.c
@@
-1937,13
+1937,13
@@
static int __ext4_journalled_writepage(struct page *page,
if (!ret)
ret = err;
- if (!ext4_has_inline_data(inode))
- ext4_walk_page_buffers(NULL, page_bufs, 0, len,
- NULL, bput_one);
ext4_set_inode_state(inode, EXT4_STATE_JDATA);
out:
unlock_page(page);
out_no_pagelock:
+ if (!inline_data && page_bufs)
+ ext4_walk_page_buffers(NULL, page_bufs, 0, len,
+ NULL, bput_one);
brelse(inode_bh);
return ret;
}