]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fat: use accessor function for msdos_dir_entry 'start'
authorNamjae Jeon <linkinjeon@gmail.com>
Thu, 13 Sep 2012 01:01:21 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 18 Sep 2012 06:04:43 +0000 (16:04 +1000)
Use accessor function for msdos_dir_entry 'start'

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/dir.c

index dc49ed2cbffa66af9407f89886d8d84cf2dc9d0f..d70d8f31f704e50cbc2e25e6b0a5bd8e2c0960c1 100644 (file)
@@ -1141,10 +1141,8 @@ int fat_alloc_new_dir(struct inode *dir, struct timespec *ts)
                de[0].ctime_cs = de[1].ctime_cs = 0;
                de[0].adate = de[0].cdate = de[1].adate = de[1].cdate = 0;
        }
-       de[0].start = cpu_to_le16(cluster);
-       de[0].starthi = cpu_to_le16(cluster >> 16);
-       de[1].start = cpu_to_le16(MSDOS_I(dir)->i_logstart);
-       de[1].starthi = cpu_to_le16(MSDOS_I(dir)->i_logstart >> 16);
+       fat_set_start(&de[0], cluster);
+       fat_set_start(&de[1], MSDOS_I(dir)->i_logstart);
        de[0].size = de[1].size = 0;
        memset(de + 2, 0, sb->s_blocksize - 2 * sizeof(*de));
        set_buffer_uptodate(bhs[0]);