summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-02-15 02:41:04 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-23 05:31:32 +0100
commit1afc99beaf0fca3767d9b67789a7ae91c4f7a9c9 (patch)
tree9aba84bc2d8e4873859bd81ddf1002fe0e3f9376 /fs/namei.c
parentnew helper: file_inode(file) (diff)
downloadlinux-1afc99beaf0fca3767d9b67789a7ae91c4f7a9c9.tar.xz
linux-1afc99beaf0fca3767d9b67789a7ae91c4f7a9c9.zip
propagate error from get_empty_filp() to its callers
Based on parts from Anatol's patch (the rest is the next commit). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index df00b754631d..e0a33f598cdf 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2941,8 +2941,8 @@ static struct file *path_openat(int dfd, struct filename *pathname,
int error;
file = get_empty_filp();
- if (!file)
- return ERR_PTR(-ENFILE);
+ if (IS_ERR(file))
+ return file;
file->f_flags = op->open_flag;