Skip to content

Commit 4838ec0

Browse files
Dan Carpenteraalexandrovich
authored andcommitted
fs/ntfs3: Unlock on error in attr_insert_range()
This error path needs to call up_write(&ni->file.run_lock) and do some other clean up before returning. Fixes: aa30ecc ("fs/ntfs3: Fallocate (FALLOC_FL_INSERT_RANGE) implementation") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent e66af07 commit 4838ec0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/ntfs3/attrib.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,8 +2153,10 @@ int attr_insert_range(struct ntfs_inode *ni, u64 vbo, u64 bytes)
21532153
le_b = NULL;
21542154
attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL,
21552155
&mi_b);
2156-
if (!attr_b)
2157-
return -ENOENT;
2156+
if (!attr_b) {
2157+
err = -ENOENT;
2158+
goto out;
2159+
}
21582160
if (!attr_b->non_res) {
21592161
err = -EINVAL;
21602162
goto out;

0 commit comments

Comments
 (0)