lkml.org 
[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSmall 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();
}
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.033 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site