lkml.org 
[lkml]   [2005]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][FAT] FAT dirent scan with hin take #2
Hi,

Some more.

On 8/30/05, Machida, Hiroyuki <machida@sm.sony.co.jp> wrote:
> --- old/fs/fat/inode.c 2005-08-29 09:38:53.308587787 +0900
> +++ new/fs/fat/inode.c 2005-08-29 09:39:33.889555606 +0900
> @@ -345,6 +347,15 @@ static void fat_delete_inode(struct inod
> static void fat_clear_inode(struct inode *inode)
> {
> struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
> + void *hints;
> +
> + down(&(MSDOS_I(inode)->scan_lock);
> + hints = (void *)(MSDOS_I(inode)->scan_hints);
> + if (hints) {
> + MSDOS_I(inode)->scan_hints = 0;
> + }
> + up(&(MSDOS_I(inode)->scan_lock);
> + if (hints) kfree(hints);

Please just make the local variable hints of type loff_t * to get rid
of the pointless casting.

>
> if (is_bad_inode(inode))
> return;
> @@ -1011,6 +1022,8 @@ static int fat_read_root(struct inode *i
> struct msdos_sb_info *sbi = MSDOS_SB(sb);
> int error;
>
> + init_MUTEX(&(MSDOS_I(inode)->scan_lock);
> + MSDOS_I(inode)->scan_hints = 0;

Use NULLs instead of 0 for pointers to keep new code sparse-clean.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-30 10:58    [W:1.011 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site