quota: add possibly missing iput() when quotaon and quotaoff races
[sfrench/cifs-2.6.git] / fs / dquot.c
index 289f48d2c72778b19c72db05d75abbfff727cf30..41b9dbd68b0e88e4a466685e1150e262e5d03c59 100644 (file)
@@ -1522,8 +1522,8 @@ int vfs_quota_off(struct super_block *sb, int type)
                                truncate_inode_pages(&toputinode[cnt]->i_data, 0);
                                mutex_unlock(&toputinode[cnt]->i_mutex);
                                mark_inode_dirty(toputinode[cnt]);
-                               iput(toputinode[cnt]);
                        }
+                       iput(toputinode[cnt]);
                        mutex_unlock(&dqopt->dqonoff_mutex);
                }
        if (sb->s_bdev)
@@ -1643,7 +1643,7 @@ int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
                error = vfs_quota_on_inode(nd.path.dentry->d_inode, type,
                                           format_id);
 out_path:
-       path_release(&nd);
+       path_put(&nd.path);
        return error;
 }