projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd354ad
)
Btrfs: make sure btrfs_remove_free_space doesn't leak EAGAIN
author
Chris Mason
<chris.mason@oracle.com>
Fri, 14 Oct 2011 10:31:20 +0000
(06:31 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Sun, 6 Nov 2011 08:03:47 +0000
(
03:03
-0500)
btrfs_remove_free_space needs to make sure to set ret back to a
valid return value after setting it to EAGAIN, otherwise we return
it to the callers.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/free-space-cache.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/free-space-cache.c
b/fs/btrfs/free-space-cache.c
index de205d59b74bbeb7f8389347d2abd9ef6df52705..f49475dfa954a625409322a4c84a157ee3a209ae 100644
(file)
--- a/
fs/btrfs/free-space-cache.c
+++ b/
fs/btrfs/free-space-cache.c
@@
-1868,6
+1868,7
@@
again:
ctl->total_bitmaps--;
}
kmem_cache_free(btrfs_free_space_cachep, info);
+ ret = 0;
goto out_lock;
}
@@
-1875,7
+1876,8
@@
again:
unlink_free_space(ctl, info);
info->offset += bytes;
info->bytes -= bytes;
- link_free_space(ctl, info);
+ ret = link_free_space(ctl, info);
+ WARN_ON(ret);
goto out_lock;
}