Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Sun, 17 Oct 1999 17:49:02 +0200 (CEST) | Subject | NFS in 2.2.13-pre17: removal of some obsolete error messages | From | Trond Myklebust <> |
| |
Hi Alan,
The following patches go a long way towards removing all the obsolete error messages that look at i_nlink in order to try to figure out whether an inode is stale or not.
Note: I don't touch the actual staleness checking code in nfs_fhget(), only the warning messages...
Cheers, Trond
--- linux-2.2.13-pre17/fs/nfs/dir.c.orig Sun Oct 17 11:38:32 1999 +++ linux-2.2.13-pre17/fs/nfs/dir.c Sun Oct 17 11:42:05 1999 @@ -506,21 +506,6 @@ dentry->d_name.name, error); } -#ifdef NFS_PARANOIA - /* - * Sanity check: if the dentry has been unhashed and the - * inode still has users, we could have problems ... - */ - if (list_empty(&dentry->d_hash) && dentry->d_inode) { - struct inode *inode = dentry->d_inode; - int max_count = (S_ISDIR(inode->i_mode) ? 1 : inode->i_nlink); - if (inode->i_count > max_count) { -printk("nfs_dentry_delete: %s/%s: ino=%ld, count=%d, nlink=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, -inode->i_ino, inode->i_count, inode->i_nlink); - } - } -#endif } /* @@ -595,14 +580,6 @@ error = -EACCES; inode = nfs_fhget(dentry, &fhandle, &fattr); if (inode) { -#ifdef NFS_PARANOIA -if (inode->i_count > (S_ISDIR(inode->i_mode) ? 1 : inode->i_nlink)) { -printk("nfs_lookup: %s/%s ino=%ld in use, count=%d, nlink=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, -inode->i_ino, inode->i_count, inode->i_nlink); -show_dentry(&inode->i_dentry); -} -#endif no_entry: d_add(dentry, inode); nfs_renew_times(dentry); @@ -624,14 +601,6 @@ inode = nfs_fhget(dentry, fhandle, fattr); if (inode) { -#ifdef NFS_PARANOIA -if (inode->i_count > (S_ISDIR(inode->i_mode) ? 1 : inode->i_nlink)) { -printk("nfs_instantiate: %s/%s ino=%ld in use, count=%d, nlink=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, -inode->i_ino, inode->i_count, inode->i_nlink); -show_dentry(&inode->i_dentry); -} -#endif d_instantiate(dentry, inode); nfs_renew_times(dentry); error = 0; @@ -738,13 +707,6 @@ dfprintk(VFS, "NFS: rmdir(%x/%ld, %s\n", dir->i_dev, dir->i_ino, dentry->d_name.name); -#ifdef NFS_PARANOIA -if (dentry->d_inode->i_count > 1) -printk("nfs_rmdir: %s/%s inode busy?? i_count=%d, i_nlink=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, -dentry->d_inode->i_count, dentry->d_inode->i_nlink); -#endif - nfs_invalidate_dircache(dir); error = nfs_proc_rmdir(NFS_SERVER(dir), NFS_FH(dentry->d_parent), dentry->d_name.name); @@ -920,12 +882,6 @@ #endif goto out; } -#ifdef NFS_PARANOIA -if (inode && inode->i_count > inode->i_nlink) -printk("nfs_safe_remove: %s/%s inode busy?? i_count=%d, i_nlink=%d\n", -dentry->d_parent->d_name.name, dentry->d_name.name, -inode->i_count, inode->i_nlink); -#endif /* * Unhash the dentry while we remove the file ... */
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |