From defc5078b6e59ac742e12bfcba5dfff8b64954b6 Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Wed, 30 Apr 2008 00:54:48 -0700 Subject: [PATCH] --- yaml --- r: 95279 b: refs/heads/master c: e3592b12f507d2c12c883d9c18084b72a5710db3 h: refs/heads/master i: 95277: c48e4a851729f097cf7cca786271d9b464008377 95275: 4393318e407fecbedfe22575da1780fb56d428d9 95271: 63ca88dbbe7573dd7be2e665abdc5c5a7ab70a7a 95263: 699f46877ab49699ecd82b00fee22d0849b17af8 v: v3 --- [refs] | 2 +- trunk/fs/quota_v2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index ff963c1bb073..574ac261b621 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 20c79e785ae3f813310261dde81b29ab0c3e28b4 +refs/heads/master: e3592b12f507d2c12c883d9c18084b72a5710db3 diff --git a/trunk/fs/quota_v2.c b/trunk/fs/quota_v2.c index 23b647f25d08..234ada903633 100644 --- a/trunk/fs/quota_v2.c +++ b/trunk/fs/quota_v2.c @@ -306,7 +306,7 @@ static uint find_free_dqentry(struct dquot *dquot, int *err) printk(KERN_ERR "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n", blk); goto out_buf; } - dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)+1); + le16_add_cpu(&dh->dqdh_entries, 1); memset(&fakedquot, 0, sizeof(struct v2_disk_dqblk)); /* Find free structure in block */ for (i = 0; i < V2_DQSTRINBLK && memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)); i++); @@ -448,7 +448,7 @@ static int free_dqentry(struct dquot *dquot, uint blk) goto out_buf; } dh = (struct v2_disk_dqdbheader *)buf; - dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)-1); + le16_add_cpu(&dh->dqdh_entries, -1); if (!le16_to_cpu(dh->dqdh_entries)) { /* Block got free? */ if ((ret = remove_free_dqentry(sb, type, buf, blk)) < 0 || (ret = put_free_dqblk(sb, type, buf, blk)) < 0) {