]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/namei.c
do_last(): don't let a bogus return value from ->open() et.al. to confuse us
[karo-tx-linux.git] / fs / namei.c
index c9eb7e84d05f75a68f9c5110fcb9b546536e1808..f26cecbd6e73450d0efc068f066d245b4da7406b 100644 (file)
@@ -3210,6 +3210,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);