]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/quota_v2.c
Fix accidental implicit cast in HR-timer conversion
[linux-2.6-omap-h63xx.git] / fs / quota_v2.c
index 23b647f25d08a405bad3ba8917d550f120d60ccf..b53827dc02d9081c50e0d0ed0acb971c2ad931b8 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <linux/quotaops.h>
 
 #include <asm/byteorder.h>
 
@@ -306,7 +307,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 +449,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) {