aboutsummaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-02-14 20:41:04 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:32 -0500
commit1afc99beaf0fca3767d9b67789a7ae91c4f7a9c9 (patch)
tree9aba84bc2d8e4873859bd81ddf1002fe0e3f9376 /fs/namei.c
parent496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (diff)
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 df00b754631..e0a33f598cd 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;