From 1afc99beaf0fca3767d9b67789a7ae91c4f7a9c9 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 14 Feb 2013 20:41:04 -0500 Subject: 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 --- fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/namei.c') 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; -- cgit v1.2.3