git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ocfs2: use all extent block suballocators
[safe/jmp/linux-2.6]
/
fs
/
ocfs2
/
localalloc.c
diff --git
a/fs/ocfs2/localalloc.c
b/fs/ocfs2/localalloc.c
index
698d79a
..
545f789
100644
(file)
--- a/
fs/ocfs2/localalloc.c
+++ b/
fs/ocfs2/localalloc.c
@@
-471,9
+471,6
@@
int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
mutex_lock(&local_alloc_inode->i_mutex);
mutex_lock(&local_alloc_inode->i_mutex);
- ac->ac_inode = local_alloc_inode;
- ac->ac_which = OCFS2_AC_USE_LOCAL;
-
if (osb->local_alloc_state != OCFS2_LA_ENABLED) {
status = -ENOSPC;
goto bail;
if (osb->local_alloc_state != OCFS2_LA_ENABLED) {
status = -ENOSPC;
goto bail;
@@
-511,10
+508,14
@@
int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
}
}
}
}
+ ac->ac_inode = local_alloc_inode;
+ ac->ac_which = OCFS2_AC_USE_LOCAL;
get_bh(osb->local_alloc_bh);
ac->ac_bh = osb->local_alloc_bh;
status = 0;
bail:
get_bh(osb->local_alloc_bh);
ac->ac_bh = osb->local_alloc_bh;
status = 0;
bail:
+ if (status < 0 && local_alloc_inode)
+ iput(local_alloc_inode);
mlog_exit(status);
return status;
mlog_exit(status);
return status;
@@
-776,7
+777,7
@@
static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
{
int status;
{
int status;
- *ac = k
calloc(1,
sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
+ *ac = k
zalloc(
sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);