From: Marc Dionne Date: Mon, 22 Jun 2009 16:25:23 +0000 (+0000) Subject: linux-call-inode-setattr-op-20090622 X-Git-Tag: openafs-devel-1_5_61~209 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b02e22b5f0590929ef9120da4799ca9a47fa3aeb;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 479b51933..fe0eef13a 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -281,9 +281,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)