diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:54:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:54:14 -0400 |
commit | 1d77062b1402aef5b26e1d3776991126e8026bde (patch) | |
tree | 96e4da18878f5fb2ae50b260e194b78803d4c7a9 /fs/nfs/dir.c | |
parent | 25581ad107be24b89d805da51a03d616f8f3d1be (diff) | |
parent | 76a9f26c9e40e9c0ed5dc8f0cedd74e733f0088d (diff) |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (51 commits)
nfs: remove nfs_put_link()
nfs-build-fix-99
git-nfs-build-fixes
Merge branch 'odirect'
NFS: alloc nfs_read/write_data as direct I/O is scheduled
NFS: Eliminate nfs_get_user_pages()
NFS: refactor nfs_direct_free_user_pages
NFS: remove user_addr, user_count, and pos from nfs_direct_req
NFS: "open code" the NFS direct write rescheduler
NFS: Separate functions for counting outstanding NFS direct I/Os
NLM: Fix reclaim races
NLM: sem to mutex conversion
locks.c: add the fl_owner to nlm_compare_locks
NFS: Display the chosen RPCSEC_GSS security flavour in /proc/mounts
NFS: Split fs/nfs/inode.c
NFS: Fix typo in nfs_do_clone_mount()
NFS: Fix compile errors introduced by referrals patches
NFSv4: Ensure that referral mounts bind to a reserved port
NFSv4: A root pathname is sent as a zero component4
NFSv4: Follow a referral
...
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index cae74dd4c7f5..3ddda6f7ecc2 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -528,7 +528,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
528 | 528 | ||
529 | lock_kernel(); | 529 | lock_kernel(); |
530 | 530 | ||
531 | res = nfs_revalidate_inode(NFS_SERVER(inode), inode); | 531 | res = nfs_revalidate_mapping(inode, filp->f_mapping); |
532 | if (res < 0) { | 532 | if (res < 0) { |
533 | unlock_kernel(); | 533 | unlock_kernel(); |
534 | return res; | 534 | return res; |
@@ -868,6 +868,17 @@ int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd) | |||
868 | return (nd->intent.open.flags & O_EXCL) != 0; | 868 | return (nd->intent.open.flags & O_EXCL) != 0; |
869 | } | 869 | } |
870 | 870 | ||
871 | static inline int nfs_reval_fsid(struct inode *dir, | ||
872 | struct nfs_fh *fh, struct nfs_fattr *fattr) | ||
873 | { | ||
874 | struct nfs_server *server = NFS_SERVER(dir); | ||
875 | |||
876 | if (!nfs_fsid_equal(&server->fsid, &fattr->fsid)) | ||
877 | /* Revalidate fsid on root dir */ | ||
878 | return __nfs_revalidate_inode(server, dir->i_sb->s_root->d_inode); | ||
879 | return 0; | ||
880 | } | ||
881 | |||
871 | static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) | 882 | static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) |
872 | { | 883 | { |
873 | struct dentry *res; | 884 | struct dentry *res; |
@@ -900,6 +911,11 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru | |||
900 | res = ERR_PTR(error); | 911 | res = ERR_PTR(error); |
901 | goto out_unlock; | 912 | goto out_unlock; |
902 | } | 913 | } |
914 | error = nfs_reval_fsid(dir, &fhandle, &fattr); | ||
915 | if (error < 0) { | ||
916 | res = ERR_PTR(error); | ||
917 | goto out_unlock; | ||
918 | } | ||
903 | inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr); | 919 | inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr); |
904 | res = (struct dentry *)inode; | 920 | res = (struct dentry *)inode; |
905 | if (IS_ERR(res)) | 921 | if (IS_ERR(res)) |