Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] fat: use accessor function for msdos_dir_entry 'start'

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


linkinjeon at gmail

Aug 11, 2012, 8:56 PM

Post #1 of 3 (46 views)
Permalink
[PATCH] fat: use accessor function for msdos_dir_entry 'start'

Use accessor function for msdos_dir_entry 'start'

Signed-off-by: Namjae Jeon <linkinjeon [at] gmail>
Signed-off-by: Amit Sahrawat <amit.sahrawat83 [at] gmail>
---
fs/fat/dir.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 7b1b9c1..2f3e66e 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -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]);
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


hirofumi at mail

Aug 11, 2012, 9:05 PM

Post #2 of 3 (43 views)
Permalink
Re: [PATCH] fat: use accessor function for msdos_dir_entry 'start' [In reply to]

Namjae Jeon <linkinjeon [at] gmail> writes:

> Use accessor function for msdos_dir_entry 'start'

Acked-by: OGAWA Hirofumi <hirofumi [at] mail>

Looks good. Thanks.

> Signed-off-by: Namjae Jeon <linkinjeon [at] gmail>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83 [at] gmail>
> ---
> fs/fat/dir.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index 7b1b9c1..2f3e66e 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -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]);

--
OGAWA Hirofumi <hirofumi [at] mail>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


linkinjeon at gmail

Aug 18, 2012, 2:54 AM

Post #3 of 3 (31 views)
Permalink
Re: [PATCH] fat: use accessor function for msdos_dir_entry 'start' [In reply to]

2012/8/12, OGAWA Hirofumi <hirofumi [at] mail>:
> Namjae Jeon <linkinjeon [at] gmail> writes:
>
>> Use accessor function for msdos_dir_entry 'start'
>
> Acked-by: OGAWA Hirofumi <hirofumi [at] mail>
>
> Looks good. Thanks.
>
>> Signed-off-by: Namjae Jeon <linkinjeon [at] gmail>
>> Signed-off-by: Amit Sahrawat <amit.sahrawat83 [at] gmail>
>> ---
>> fs/fat/dir.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
>> index 7b1b9c1..2f3e66e 100644
>> --- a/fs/fat/dir.c
>> +++ b/fs/fat/dir.c
>> @@ -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]);
>
> --
> OGAWA Hirofumi <hirofumi [at] mail>
>
Hi. Andrew.

Would you plz check this patch ?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.