projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a826d6d
)
Btrfs: check return value of btrfs_search_slot properly
author
Josef Bacik
<josef@redhat.com>
Wed, 16 Mar 2011 17:59:32 +0000
(13:59 -0400)
committer
Josef Bacik
<josef@redhat.com>
Thu, 17 Mar 2011 18:21:39 +0000
(14:21 -0400)
Doing an audit of where we use btrfs_search_slot only showed one place where we
don't check the return value of btrfs_search_slot properly. Just fix
mark_extent_written to see if btrfs_search_slot failed and act accordingly.
Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/file.c
b/fs/btrfs/file.c
index 3786eca2a905f821047d21cb3eb7b092024c1e9f..a85b044cf39e79dd48babb9f8bbb4b2908d4e3dd 100644
(file)
--- a/
fs/btrfs/file.c
+++ b/
fs/btrfs/file.c
@@
-608,6
+608,8
@@
again:
key.offset = split;
ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
+ if (ret < 0)
+ goto out;
if (ret > 0 && path->slots[0] > 0)
path->slots[0]--;