Re: 2.6.2-rc2 nfsd+xfs spins in i_size_read()

From: Christoph Hellwig
Date: Sat Jan 31 2004 - 12:08:14 EST


Here's an (untested) quickhack to take i_sem in linvfs_getattr.
I'll try to come up with a real fix next week.

--- 1.39/fs/xfs/linux/xfs_iops.c Fri Jan 9 01:07:07 2004
+++ edited/fs/xfs/linux/xfs_iops.c Sat Jan 31 18:41:44 2004
@@ -478,8 +478,11 @@
vnode_t *vp = LINVFS_GET_VP(inode);
int error = 0;

- if (unlikely(vp->v_flag & VMODIFIED))
+ if (unlikely(vp->v_flag & VMODIFIED)) {
+ down(&inode->i_sem);
error = vn_revalidate(vp);
+ up(&inode->i_sem);
+ }
if (!error)
generic_fillattr(inode, stat);
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/