]> Pileus Git - ~andy/linux/blobdiff - fs/namei.c
Fix mountpoint reference leakage in linkat
[~andy/linux] / fs / namei.c
index 445d9bbc21eb3b17e735a685b4bc626bfec72a34..d580df2e6804d0863d555234388a34397387c3e6 100644 (file)
@@ -3926,10 +3926,13 @@ out_dput:
        done_path_create(&new_path, new_dentry);
        if (delegated_inode) {
                error = break_deleg_wait(&delegated_inode);
-               if (!error)
+               if (!error) {
+                       path_put(&old_path);
                        goto retry;
+               }
        }
        if (retry_estale(error, how)) {
+               path_put(&old_path);
                how |= LOOKUP_REVAL;
                goto retry;
        }