projects
/
wrapfs-3.14.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77b14d6
)
ext2: check err when partial != NULL
author
Chengguang Xu
<cgxu519@mykernel.net>
Tue, 5 Nov 2019 04:51:00 +0000
(12:51 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:35:18 +0000
(20:35 +0100)
commit
e705f4b8aa27a59f8933e8f384e9752f052c469c
upstream.
Check err when partial == NULL is meaningless because
partial == NULL means getting branch successfully without
error.
CC: stable@vger.kernel.org
Link:
https://lore.kernel.org/r/20191105045100.7104-1-cgxu519@mykernel.net
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext2/inode.c
patch
|
blob
|
history
diff --git
a/fs/ext2/inode.c
b/fs/ext2/inode.c
index e4bb9386c04551e1af155154213285c6da688531..36a2ab6f61505b1fe19fa8f7e2a4f5ca3790caca 100644
(file)
--- a/
fs/ext2/inode.c
+++ b/
fs/ext2/inode.c
@@
-699,10
+699,13
@@
static int ext2_get_blocks(struct inode *inode,
if (!partial) {
count++;
mutex_unlock(&ei->truncate_mutex);
- if (err)
- goto cleanup;
goto got_it;
}
+
+ if (err) {
+ mutex_unlock(&ei->truncate_mutex);
+ goto cleanup;
+ }
}
/*