This piece of code intent to calm down the kernel
WARN_ON messsage show up since 3.9 upstream. So we
can just remove it for now. We'll add a ldiskfs
patch to resolve this issue while 3.9 server support
come up.
Change-Id: Ied941b98d213e3aff1c5ba7ec4c6436bdef903c7
Signed-off-by: yang sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/9644
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
#ifdef HAVE_INODEOPS_TRUNCATE
if (inode->i_op->truncate) {
inode->i_op->truncate(inode);
- } else {
-#endif
- if (!(inode->i_state & (I_NEW|I_FREEING)))
- mutex_lock(&inode->i_mutex);
- ldiskfs_truncate(inode);
- if (!(inode->i_state & (I_NEW|I_FREEING)))
- mutex_unlock(&inode->i_mutex);
-#ifdef HAVE_INODEOPS_TRUNCATE
- }
+ } else
#endif
+ ldiskfs_truncate(inode);
/*
* For a partial-page truncate, flush the page to disk immediately to