Hi!

 > Sorry - could not find the patch in the thread on LKML -
 > so could you give some pointers to your corrected nfs client
 > patch.

These patches were not sent to the LKML, I think because Trond wanted to
wait some time (during I test it)...

But in the meantime, here they are ... They worked for me .

------------------------------------------------------------------------
--- linux-2.4.5/fs/inode.c.orig Fri May 25 14:15:38 2001
+++ linux-2.4.5/fs/inode.c      Wed May 30 12:17:29 2001
@@ -1044,6 +1044,8 @@
                                inode->i_state|=I_FREEING;
                                inodes_stat.nr_inodes--;
                                spin_unlock(&inode_lock);
+                               if (inode->i_data.nrpages)
+                                       truncate_inode_pages(&inode->i_data, 0);
                                clear_inode(inode);
                        }
                }

--- linux-2.4.5-pre6/fs/nfs/dir.c.orig  Fri May 25 14:15:38 2001
+++ linux-2.4.5-pre6/fs/nfs/dir.c       Thu May 31 14:53:32 2001
@@ -753,6 +753,8 @@

        nfs_zap_caches(dir);
        error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name);
+       if (!error)
+               dentry->d_inode->i_nlink -= 2;

        return error;
 }
@@ -870,6 +872,8 @@
        error = NFS_PROTO(dir)->remove(dir, &dentry->d_name);
        if (error < 0)
                goto out;
+       if (inode)
+               inode->i_nlink--;

  out_delete:
        /*
------------------------------------------------------------------------

Gergely


Reply via email to