aboutsummaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 157c3dbacf6c..c87e15ee9255 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2917,6 +2917,10 @@ opened:
goto exit_fput;
}
out:
+ if (unlikely(error > 0)) {
+ WARN_ON(1);
+ error = -EINVAL;
+ }
if (got_write)
mnt_drop_write(nd->path.mnt);
path_put(&save_parent);