]> git.hungrycats.org Git - linux/commit
[PATCH] handle bad inodes in put_inode
authorAndrew Morton <akpm@digeo.com>
Thu, 3 Apr 2003 00:26:20 +0000 (16:26 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 3 Apr 2003 00:26:20 +0000 (16:26 -0800)
commit68fa81207f9388bd2f073d23350c179ca58259b6
tree7e39f50842bf713faa4bdf7ab69a2b11e319c18a
parent505f7dd2700a934b8f342f578dc68a1c495646fc
[PATCH] handle bad inodes in put_inode

From: "J. Bruce Fields" <bfields@fieldses.org>

If the NFS daemon is presented with a filehandle for a file that has
been deleted, it does an iget() in fs/exportfs/expfs.c:export_iget() and
gets a bad inode back.  When it subsequently iput()s the inode, the
result is:

Mar 27 12:53:40 snoopy kernel: EXT2-fs error (device ide0(3,3)): ext2_free_blocks: Freeing blocks not in datazone - block = 1802201963, count = 27499
Mar 27 12:53:40 snoopy kernel: Remounting filesystem read-only

The same can happen if ext2_get_inode() returns an error - ext2_read_inode()
will return an uninitialised inode and ext2_put_inode() is not allowed to go
looking inside the bad inode.
fs/ext2/inode.c
fs/ext3/inode.c