linux/arch
Anatol Pomozov 39b6525274 fs: Preserve error code in get_empty_filp(), part 2
Allocating a file structure in function get_empty_filp() might fail because
of several reasons:
 - not enough memory for file structures
 - operation is not allowed
 - user is over its limit

Currently the function returns NULL in all cases and we loose the exact
reason of the error. All callers of get_empty_filp() assume that the function
can fail with ENFILE only.

Return error through pointer. Change all callers to preserve this error code.

[AV: cleaned up a bit, carved the get_empty_filp() part out into a separate commit
(things remaining here deal with alloc_file()), removed pipe(2) behaviour change]

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-02-22 23:31:32 -05:00
..
alpha new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
arm Sound fixes #2 for 3.8-rc4 2013-01-16 11:33:52 -08:00
arm64 - Page protection fixes, including proper PAGE_NONE handling 2013-01-16 09:44:40 -08:00
avr32 ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
blackfin new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
c6x These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
cris new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
frv ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
h8300 These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
hexagon Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
ia64 fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
m32r ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2013-01-18 11:58:10 -08:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-01-07 07:39:32 -08:00
mips new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
mn10300 arch/mn10300/Kconfig: select CONFIG_GENERIC_ATOMIC64 2013-01-11 14:54:55 -08:00
openrisc ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
parisc ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
powerpc new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
s390 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
score ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
sh new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
sparc sparc: remove __devinit, __devexit annotations 2013-01-12 15:28:45 -08:00
tile ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
unicore32 ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
x86 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
xtensa These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
.gitignore
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00