[PATCH 10/11] quota: drop dq_data_lock where possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FIXME: I've skipped ocfs2 code, because i dont understand it.
       Let's Jan do it someday.

Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxx>
---
 fs/quota/dquot.c      |    2 --
 fs/quota/quota_tree.c |    4 ----
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 2c87709..fc3b63a 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2416,7 +2416,6 @@ static void do_get_dqblk(struct dquot *dquot, struct fs_disk_quota *di)
 			FS_USER_QUOTA : FS_GROUP_QUOTA;
 	di->d_id = dquot->dq_id;
 
-	spin_lock(&dq_opt(dquot)->dq_data_lock);
 	spin_lock(&dquot->dq_lock);
 	di->d_blk_hardlimit = stoqb(dm->dqb_bhardlimit);
 	di->d_blk_softlimit = stoqb(dm->dqb_bsoftlimit);
@@ -2427,7 +2426,6 @@ static void do_get_dqblk(struct dquot *dquot, struct fs_disk_quota *di)
 	di->d_btimer = dm->dqb_btime;
 	di->d_itimer = dm->dqb_itime;
 	spin_unlock(&dquot->dq_lock);
-	spin_unlock(&dq_opt(dquot)->dq_data_lock);
 }
 
 int dquot_get_dqblk(struct super_block *sb, int type, qid_t id,
diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c
index 1643c30..49e3419 100644
--- a/fs/quota/quota_tree.c
+++ b/fs/quota/quota_tree.c
@@ -375,11 +375,9 @@ int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot)
 			return ret;
 		}
 	}
-	spin_lock(&sb_dqopt(sb)->dq_data_lock);
 	spin_lock(&dquot->dq_lock);
 	info->dqi_ops->mem2disk_dqblk(ddquot, dquot);
 	spin_unlock(&dquot->dq_lock);
-	spin_unlock(&sb_dqopt(sb)->dq_data_lock);
 	ret = sb->s_op->quota_write(sb, type, ddquot, info->dqi_entry_size,
 				    dquot->dq_off);
 	if (ret != info->dqi_entry_size) {
@@ -633,7 +631,6 @@ int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot)
 		kfree(ddquot);
 		goto out;
 	}
-	spin_lock(&sb_dqopt(sb)->dq_data_lock);
 	spin_lock(&dquot->dq_lock);
 	info->dqi_ops->disk2mem_dqblk(dquot, ddquot);
 	if (!dquot->dq_dqb.dqb_bhardlimit &&
@@ -642,7 +639,6 @@ int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot)
 	    !dquot->dq_dqb.dqb_isoftlimit)
 		set_bit(DQ_FAKE_B, &dquot->dq_flags);
 	spin_unlock(&dquot->dq_lock);
-	spin_unlock(&sb_dqopt(sb)->dq_data_lock);
 	kfree(ddquot);
 out:
 	dqstats_inc(DQST_READS);
-- 
1.6.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux