Messages in this thread Patch in this message | | | Date | Thu, 24 Feb 2000 00:19:17 +0100 | From | Jan Kara <> | Subject | Small bug in ext2_delete() |
| |
Hello.
I've found small bug in ext2_delete() in 2.3.47. The problem is that VFS inode handling code expects that clear_inode() is called from foo_delete(). That wasn't done when you had bad inode or for example ACL inode... Also there was a minor problem that unlock_kernel() was not called in that case. The fix agains 2.3.47 is attached.
Honza
--- fs/ext2/inode.c Wed Feb 23 17:29:10 2000 +++ fs/ext2/inode.c Wed Feb 23 19:16:46 2000 @@ -50,7 +50,7 @@ if (is_bad_inode(inode) || inode->i_ino == EXT2_ACL_IDX_INO || inode->i_ino == EXT2_ACL_DATA_INO) - return; + goto no_delete; inode->u.ext2_i.i_dtime = CURRENT_TIME; mark_inode_dirty(inode); ext2_update_inode(inode, IS_SYNC(inode)); @@ -59,6 +59,10 @@ ext2_truncate (inode); ext2_free_inode (inode); + unlock_kernel(); + return; +no_delete: + clear_inode(inode); /* We must guarantee clearing of inode... */ unlock_kernel(); } | |