vmtruncate() does not need lock_kernel(). And lock_kernel() is not taken by other vmtruncate() callers. fs/attr.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff -puN fs/attr.c~inode_setattr-lock_kernel-removal fs/attr.c --- 25/fs/attr.c~inode_setattr-lock_kernel-removal 2003-03-16 00:39:53.000000000 -0800 +++ 25-akpm/fs/attr.c 2003-03-16 00:39:53.000000000 -0800 @@ -68,16 +68,10 @@ int inode_setattr(struct inode * inode, int error = 0; if (ia_valid & ATTR_SIZE) { - if (attr->ia_size == inode->i_size) { - if (ia_valid == ATTR_SIZE) - goto out; /* we can skip lock_kernel() */ - } else { - lock_kernel(); + if (attr->ia_size != inode->i_size) error = vmtruncate(inode, attr->ia_size); - unlock_kernel(); - if (error) - goto out; - } + if (error || (ia_valid == ATTR_SIZE)) + goto out; } lock_kernel(); _