linux/net
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
..
9p
802
8021q
appletalk
atm new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ax25
batman-adv batman-adv: fix random jitter calculation 2012-12-26 14:13:23 -08:00
bluetooth
bridge bridge: add empty br_mdb_init() and br_mdb_uninit() definitions. 2013-01-03 03:35:22 -08:00
caif
can
ceph Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2013-01-02 17:32:49 -08:00
core new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
dcb
dccp
decnet
dns_resolver Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-12-16 15:40:50 -08:00
dsa
ethernet
ieee802154
ipv4 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ipv6 ipv6: use addrconf_get_prefix_route for prefix route lookup [v2] 2013-01-10 14:22:54 -08:00
ipx
irda
iucv s390/irq: remove split irq fields from /proc/stat 2013-01-08 10:57:07 +01:00
key
l2tp
lapb
llc
mac80211 mac80211: fix maximum MTU 2013-01-03 13:00:01 +01:00
mac802154 mac802154: fix NOHZ local_softirq_pending 08 warning 2013-01-04 13:47:21 -08:00
netfilter new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
netlabel
netlink new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
netrom
nfc
openvswitch
packet
phonet
rds IB/rds: suppress incompatible protocol when version is known 2012-12-26 15:17:37 -08:00
rfkill
rose
rxrpc
sched net: sched: integer overflow fix 2012-12-22 00:03:00 -08:00
sctp sctp: fix Kconfig bug in default cookie hmac selection 2013-01-07 09:27:06 -08:00
sunrpc new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
tipc
unix new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
wanrouter
wimax
wireless net, wireless: overwrite default_ethtool_ops 2013-01-11 15:55:48 -08:00
x25
xfrm
Kconfig
Makefile
compat.c
nonet.c
socket.c fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
sysctl_net.c