diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-14 20:41:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:32 -0500 |
commit | 1afc99beaf0fca3767d9b67789a7ae91c4f7a9c9 (patch) | |
tree | 9aba84bc2d8e4873859bd81ddf1002fe0e3f9376 /fs/namei.c | |
parent | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (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.c | 4 |
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, | |||
2941 | int error; | 2941 | int error; |
2942 | 2942 | ||
2943 | file = get_empty_filp(); | 2943 | file = get_empty_filp(); |
2944 | if (!file) | 2944 | if (IS_ERR(file)) |
2945 | return ERR_PTR(-ENFILE); | 2945 | return file; |
2946 | 2946 | ||
2947 | file->f_flags = op->open_flag; | 2947 | file->f_flags = op->open_flag; |
2948 | 2948 | ||