]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fdtable: Delete pointless code in dup_fd()
authorVadim Lobanov <vlobanov@speakeasy.net>
Sun, 10 Dec 2006 10:21:09 +0000 (02:21 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sun, 10 Dec 2006 17:57:21 +0000 (09:57 -0800)
commit01f2aa293b5b4c9ab1e3e8c02cc5a7f350721242
tree80dee984c0b9f06d458257e54dc7742c981d2b05
parentacaf1b0bafcb7da298c29ff1b38c7fd2ff624327
[PATCH] fdtable: Delete pointless code in dup_fd()

The dup_fd() function creates a new files_struct and fdtable embedded inside
that files_struct, and then possibly expands the fdtable using expand_files().

The out_release error path is invoked when expand_files() returns an error
code.  However, when this attempt to expand fails, the fdtable is left in its
original embedded form, so it is pointless to try to free the associated
fdarray and fdsets.

Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/fork.c