From b02e22b5f0590929ef9120da4799ca9a47fa3aeb Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Mon, 22 Jun 2009 16:25:23 +0000 Subject: [PATCH] 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 --- 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 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) -- 2.39.5