Skip to content

Commit e7b2ec3

Browse files
riteshharjanikdave
authored andcommitted
btrfs: return value from btrfs_mark_extent_written() in case of error
We always return 0 even in case of an error in btrfs_mark_extent_written(). Fix it to return proper error value in case of a failure. All callers handle it. CC: [email protected] # 4.4+ Signed-off-by: Ritesh Harjani <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 5b434df commit e7b2ec3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/btrfs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
10941094
int del_nr = 0;
10951095
int del_slot = 0;
10961096
int recow;
1097-
int ret;
1097+
int ret = 0;
10981098
u64 ino = btrfs_ino(inode);
10991099

11001100
path = btrfs_alloc_path();
@@ -1315,7 +1315,7 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
13151315
}
13161316
out:
13171317
btrfs_free_path(path);
1318-
return 0;
1318+
return ret;
13191319
}
13201320

13211321
/*

0 commit comments

Comments
 (0)