X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fquota_v2.c;h=234ada90363343ad668eff8213dd0927af7aa6f2;hb=4314652bb41df08ad65bd25176ba1dfd24b14a51;hp=23b647f25d08a405bad3ba8917d550f120d60ccf;hpb=5f78e4d33945b291d12765cdd7e4304f437b9361;p=karo-tx-linux.git diff --git a/fs/quota_v2.c b/fs/quota_v2.c index 23b647f25d08..234ada903633 100644 --- a/fs/quota_v2.c +++ b/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) {