[PATCH] expand_fdtable(): remove pointless unlock+lock
This unlock/lock on a super-unlikely path isn't worth the kernel text. Cc: Vadim Lobanov <vlobanov@speakeasy.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
74d392aaab
commit
327dcaadc0
@@ -317,9 +317,7 @@ static int expand_fdtable(struct files_struct *files, int nr)
|
|||||||
free_fdtable(cur_fdt);
|
free_fdtable(cur_fdt);
|
||||||
} else {
|
} else {
|
||||||
/* Somebody else expanded, so undo our attempt */
|
/* Somebody else expanded, so undo our attempt */
|
||||||
spin_unlock(&files->file_lock);
|
|
||||||
__free_fdtable(new_fdt);
|
__free_fdtable(new_fdt);
|
||||||
spin_lock(&files->file_lock);
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user