fat: use accessor function for msdos_dir_entry 'start'
PATCH 1/1 fat: use accessor function for msdos_dir_entry 'start'
Use accessor function for msdos_dir_entry 'start'
Signed-off-by Namjae Jeon <[email protected]>
Signed-off-by Amit Sahrawat <[email protected]>
--- fs/fat/dir.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
fs/fat/dir.c +2 -4
@@ -1143,10 +1143,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 ]);
Signature · 1 line
1.7.9.5
Quoted 1 line · Namjae Jeon
Use accessor function for
msdos_dir_entry'start'
Acked-by OGAWA Hirofumi <[email protected]>
Looks good. Thanks.
Quoted 23 lines
Signed-off-by Namjae Jeon <[email protected]>Signed-off-by Amit Sahrawat <[email protected]>--- fs/fat/dir.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)fs/fat/dir.c +2
-4@@ -1143,10 +1143,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 ]);
Signature · 1 line
OGAWA Hirofumi <[email protected]>
2012/8/12, OGAWA Hirofumi <[email protected]>:
Quoted 27 lines
Quoted 1 line · Namjae Jeon
Use accessor function for
msdos_dir_entry'start'Acked-by OGAWA Hirofumi <[email protected]>Looks good. Thanks.
Quoted 19 lines
Signed-off-by Namjae Jeon <[email protected]>Signed-off-by Amit Sahrawat <[email protected]>--- fs/fat/dir.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)fs/fat/dir.c +0
-4@@ -1143,10 +1143,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 );
Quoted 9 lines
Quoted 5 lines
fs/fat/dir.c +2
-0+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]);--
OGAWA Hirofumi <[email protected]>
Hi. Andrew.
Would you plz check this patch ?
Thanks.