lkml.org 
[lkml]   [1998]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VFAT patch (Re: 2.1.114: VFAT corrupts first block of a file)


On Sat, 8 Aug 1998, Gordon Chaffee wrote:
>
> Thanks for the very clear script. This patch should fix the problem.
> Unless there is some other type of corruption I'm not aware of, I think
> that takes care of one of the showstoppers that I saw on Alan's list.
>
> - Gordon
>
> --- linux-2.1.115-clean/fs/vfat/namei.c Tue Jul 28 10:17:49 1998
> +++ linux/fs/vfat/namei.c Sat Aug 8 03:09:01 1998
> @@ -1822,6 +1822,8 @@
> put_new_inode = 0;
> }
>
> + clear_inode(old_inode);
> +
> rename_done:
> if (locked)
> fat_unlock_creation();

This looks strange. It's almost never correct do do a clear_inode() on an
inode in this manner: the clear_inode should be called when the inode is
free'd.

I've applied the patch, but I'd ask you to look a bit deeper: as far as I
can tell there might for example be a missing "fat_delete_inode()" call
somewhere.

The VFS layer will call the "delete" function on iput(), and if it doesn't
get called it may mean that:

- the inode counts are wrong for some reason

OR

- you haven't cleared "inode->i_nlink" when you marked the old inode
deleted, so the VFS layer doesn't know that it should call the delete
function..

The i_nlink thing looks like the more likely suspect.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.069 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site