X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=fs%2Fnfs%2Fdir.c;h=e4a04d16b8b06fd4faf22b7ba238f404403a8c7f;hb=54af3bb543c071769141387a42deaaab5074da55;hp=322141f4ab4810f5230898c2f1773e5290476242;hpb=a50f7951a31d3b976e829250853f89c9d2da32c0;p=deliverable%2Flinux.git diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 322141f4ab48..e4a04d16b8b0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -654,7 +654,7 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) if (IS_ROOT(dentry)) return 1; - verf = (unsigned long)dentry->d_fsdata; + verf = dentry->d_time; if (nfs_caches_unstable(dir) || verf != NFS_I(dir)->cache_change_attribute) return 0; @@ -663,7 +663,7 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) { - dentry->d_fsdata = (void *)verf; + dentry->d_time = verf; } static void nfs_refresh_verifier(struct dentry * dentry, unsigned long verf) @@ -869,7 +869,7 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { lock_kernel(); drop_nlink(inode); - nfs_complete_unlink(dentry); + nfs_complete_unlink(dentry, inode); unlock_kernel(); } /* When creating a negative dentry, we want to renew d_time */ @@ -1162,6 +1162,8 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) } if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR)) return NULL; + if (name.len > NFS_SERVER(dir)->namelen) + return NULL; /* Note: caller is already holding the dir->i_mutex! */ dentry = d_alloc(parent, &name); if (dentry == NULL) @@ -1411,7 +1413,7 @@ static int nfs_sillyrename(struct inode *dir, struct dentry *dentry) nfs_renew_times(dentry); nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); d_move(dentry, sdentry); - error = nfs_async_unlink(dentry); + error = nfs_async_unlink(dir, dentry); /* If we return 0 we don't unlink */ } dput(sdentry);