From: Andrew Morton Date: Fri, 29 Sep 2006 09:01:44 +0000 (-0700) Subject: [PATCH] expand_fdtable(): remove pointless unlock+lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=327dcaadc0bc08ad081aa8e36b6ec7ad7aa45e30;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] expand_fdtable(): remove pointless unlock+lock This unlock/lock on a super-unlikely path isn't worth the kernel text. Cc: Vadim Lobanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/file.c b/fs/file.c index 2a991ac8e562..8e81775c5dc8 100644 --- a/fs/file.c +++ b/fs/file.c @@ -317,9 +317,7 @@ static int expand_fdtable(struct files_struct *files, int nr) free_fdtable(cur_fdt); } else { /* Somebody else expanded, so undo our attempt */ - spin_unlock(&files->file_lock); __free_fdtable(new_fdt); - spin_lock(&files->file_lock); } return 1; }