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

Christoph Hellwig
2004-01-31T17:07:13Z

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;