linux_dsm_epyc7002/fs
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 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
adfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
affs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
afs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
autofs4 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
befs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
bfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
btrfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
cachefiles FS-Cache: Mark cancellation of in-progress operation 2012-12-20 22:34:00 +00:00
ceph new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
cifs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
coda new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
configfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
cramfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
debugfs debugfs: convert gid= argument from decimal, not octal 2013-01-11 05:56:01 -08:00
devpts TTY: devpts, document devpts inode operations 2012-10-22 16:50:13 -07:00
dlm dlm: fix lvb invalidation conditions 2012-11-16 11:20:42 -06:00
ecryptfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
efs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
exofs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
exportfs Merge branch 'for-3.8' of git://linux-nfs.org/~bfields/linux 2012-12-20 14:04:11 -08:00
ext2 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ext3 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ext4 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
f2fs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
fat new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
freevxfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
fscache FS-Cache: Clear remaining page count on retrieval cancellation 2012-12-20 22:35:15 +00:00
fuse new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
gfs2 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
hfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
hfsplus new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
hostfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
hpfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
hppfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
hugetlbfs fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
isofs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
jbd jbd: don't wake kjournald unnecessarily 2013-01-14 22:50:45 +01:00
jbd2 Various bug fixes for ext4. Perhaps the most serious bug fixed is one 2013-01-02 09:57:34 -08:00
jffs2 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
jfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
lockd new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
logfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
minix new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ncpfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
nfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
nfs_common
nfsd new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
nilfs2 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
nls
notify new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ntfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ocfs2 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
omfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
openpromfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
proc new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
pstore pstore: remove __dev* attributes. 2013-01-03 15:57:14 -08:00
qnx4 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
qnx6 new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
quota quota: Use the pre-processor to compile out quotactl_cmd_write when !CONFIG_BLOCK 2012-12-13 16:33:24 +01:00
ramfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
reiserfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
romfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
squashfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
sysfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
sysv new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ubifs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
udf new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ufs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
xfs new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
aio.c
anon_inodes.c fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
attr.c userns: Allow chown and setgid preservation 2012-11-20 04:17:24 -08:00
bad_inode.c lseek: the "whence" argument is called "whence" 2012-12-17 17:15:12 -08:00
binfmt_aout.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
binfmt_elf_fdpic.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
binfmt_elf.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
binfmt_em86.c exec: use -ELOOP for max recursion depth 2012-12-17 17:15:23 -08:00
binfmt_flat.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
binfmt_misc.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
binfmt_script.c exec: do not leave bprm->interp on stack 2012-12-20 17:40:19 -08:00
binfmt_som.c get rid of pt_regs argument of ->load_binary() 2012-11-28 21:53:38 -05:00
bio-integrity.c block: Ues bi_pool for bio_integrity_alloc() 2012-09-09 10:35:38 +02:00
bio.c vfs: fix: don't increase bio_slab_max if krealloc() fails 2012-10-22 22:00:26 +02:00
block_dev.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
buffer.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
char_dev.c char_dev: pin parent kobject 2012-10-22 08:50:37 +03:00
compat_binfmt_elf.c coredump: extend core dump note section to contain file names of mapped files 2012-10-06 03:05:17 +09:00
compat_ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
compat.c vfs: define struct filename and have getname() return it 2012-10-12 20:14:55 -04:00
coredump.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
coredump.h coredump: update coredump-related headers 2012-10-06 03:05:15 +09:00
dcache.c vfs: d_obtain_alias() needs to use "/" as default name. 2012-12-20 18:49:10 -05:00
dcookies.c
direct-io.c direct-io: don't read inode->i_blkbits multiple times 2012-11-29 12:38:44 -08:00
drop_caches.c
eventfd.c fs, eventfd: add procfs fdinfo helper 2012-12-17 17:15:27 -08:00
eventpoll.c epoll: prevent missed events on EPOLL_CTL_MOD 2013-01-02 09:16:43 -08:00
exec.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
fcntl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
fhandle.c Merge branch 'for-3.8' of git://linux-nfs.org/~bfields/linux 2012-12-20 14:04:11 -08:00
fifo.c
file_table.c fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
file.c misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
filesystems.c vfs: define struct filename and have getname() return it 2012-10-12 20:14:55 -04:00
fs_struct.c kill daemonize() 2012-11-28 21:49:02 -05:00
fs-writeback.c writeback: fix a typo in comment 2012-12-12 17:38:34 -08:00
generic_acl.c userns: Pass a userns parameter into posix_acl_to_xattr and posix_acl_from_xattr 2012-09-18 01:01:35 -07:00
inode.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
internal.h writeback: put unused inodes to LRU after writeback completion 2012-11-26 17:41:24 -08:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ioprio.c
Kconfig Introduce a new file system, Flash-Friendly File System (F2FS), to Linux 3.8. 2012-12-20 13:54:52 -08:00
Kconfig.binfmt coredump: make core dump functionality optional 2012-10-06 03:05:15 +09:00
libfs.c vfs: drop vmtruncate 2012-12-20 18:46:29 -05:00
locks.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
mbcache.c
mount.h proc: Usable inode numbers for the namespace file descriptors. 2012-11-20 04:19:49 -08:00
mpage.c
namei.c propagate error from get_empty_filp() to its callers 2013-02-22 23:31:32 -05:00
namespace.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
no-block.c
open.c propagate error from get_empty_filp() to its callers 2013-02-22 23:31:32 -05:00
pipe.c fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
pnode.c
pnode.h vfs: Only support slave subtrees across different user namespaces 2012-11-19 05:59:20 -08:00
posix_acl.c userns: Convert vfs posix_acl support to use kuids and kgids 2012-09-18 01:01:35 -07:00
proc_namespace.c
read_write.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
read_write.h compat: fs: Generic compat_sys_sendfile implementation 2012-10-02 21:35:55 -04:00
readdir.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
select.c switch simple cases of fget_light to fdget 2012-09-26 22:20:08 -04:00
seq_file.c seq_file: fix new kernel-doc warnings 2013-01-10 14:35:24 -08:00
signalfd.c fs, epoll: add procfs fdinfo helper 2012-12-17 17:15:27 -08:00
splice.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
stack.c
stat.c vfs: fix readlinkat to retry on ESTALE 2012-12-20 18:50:01 -05:00
statfs.c vfs: fix user_statfs to retry once on ESTALE errors 2012-12-20 18:50:07 -05:00
super.c vfs: drop lock/unlock super 2012-10-09 23:33:39 -04:00
sync.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
timerfd.c switch simple cases of fget_light to fdget 2012-09-26 22:20:08 -04:00
utimes.c vfs: allow utimensat() calls to retry once on an ESTALE error 2012-12-20 18:50:08 -05:00
xattr_acl.c userns: Fix posix_acl_file_xattr_userns gid conversion 2012-10-12 13:16:48 -07:00
xattr.c vfs: make lremovexattr retry once on ESTALE error 2012-12-20 18:50:11 -05:00