From: Marc Dionne Date: Mon, 22 Jun 2009 16:25:43 +0000 (+0000) Subject: STABLE14-linux-call-inode-setattr-op-20090622 X-Git-Tag: openafs-stable-1_4_11pre2~7 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5965d38655caee1026cd9f32826db23d888f2688;p=packages%2Fo%2Fopenafs.git 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) --- 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)