]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ext3: avoid triggering ext3_error on bad NFS file handle
authorNeil Brown <neilb@suse.de>
Wed, 30 Aug 2006 15:58:44 +0000 (17:58 +0200)
committerAdrian Bunk <bunk@stusta.de>
Wed, 30 Aug 2006 15:58:44 +0000 (17:58 +0200)
commit06e346507acbf0feb78abf2179a7d46b7114690a
treeb107f8bc09a89f6baeb3cf2249e89a22903542e9
parent439fc6b301c680195fdb18caa5cebdbdf2f9d670
ext3: avoid triggering ext3_error on bad NFS file handle

The inode number out of an NFS file handle gets passed eventually to
ext3_get_inode_block() without any checking.  If ext3_get_inode_block()
allows it to trigger an error, then bad filehandles can have unpleasant
effect - ext3_error() will usually cause a forced read-only remount, or a
panic if `errors=panic' was used.

So remove the call to ext3_error there and put a matching check in
ext3/namei.c where inode numbers are read off storage.

Andrew Morton fixed an off-by-one error.

Dann Frazier ported the patch to 2.6.16.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/ext3/inode.c
fs/ext3/namei.c
include/linux/ext3_fs.h