--- y/fs/namespace.c +++ x/fs/namespace.c @@ -1801,6 +1801,9 @@ int path_umount(struct path *path, int f if (!ret) ret = do_umount(mnt, flags); + if (ret) + return ret; + /* we mustn't call path_put() as that would clear mnt_expiry_mark */ dput(path->dentry); mntput_no_expire(mnt);