From 5965d38655caee1026cd9f32826db23d888f2688 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Mon, 22 Jun 2009 16:25:43 +0000 Subject: [PATCH] STABLE14-linux-call-inode-setattr-op-20090622 LICENSE IPL10 FIXES 124942 call inode's setattr op instead of just inode_setattr, when one is available. needed for xfs, notably also will cause truncates to be journalled for ext3, which may solve some existing issues (cherry picked from commit b02e22b5f0590929ef9120da4799ca9a47fa3aeb) --- src/afs/LINUX/osi_file.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index bc1618793..141fad05b 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -234,9 +234,14 @@ osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize) code = inode_change_ok(inode, &newattrs); if (!code) #ifdef INODE_SETATTR_NOT_VOID - code = inode_setattr(inode, &newattrs); +#if defined(AFS_LINUX26_ENV) + if (inode->i_op && inode->i_op->setattr) + code = inode->i_op->setattr(afile->filp->f_dentry, &newattrs); + else +#endif + code = inode_setattr(inode, &newattrs); #else - inode_setattr(inode, &newattrs); + inode_setattr(inode, &newattrs); #endif unlock_kernel(); if (!code) -- 2.39.5