diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index c27258b5d3e1..ea97408e423e 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) | |||
654 | 654 | ||
655 | if (IS_ROOT(dentry)) | 655 | if (IS_ROOT(dentry)) |
656 | return 1; | 656 | return 1; |
657 | verf = (unsigned long)dentry->d_fsdata; | 657 | verf = dentry->d_time; |
658 | if (nfs_caches_unstable(dir) | 658 | if (nfs_caches_unstable(dir) |
659 | || verf != NFS_I(dir)->cache_change_attribute) | 659 | || verf != NFS_I(dir)->cache_change_attribute) |
660 | return 0; | 660 | return 0; |
@@ -663,7 +663,7 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) | |||
663 | 663 | ||
664 | static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) | 664 | static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) |
665 | { | 665 | { |
666 | dentry->d_fsdata = (void *)verf; | 666 | dentry->d_time = verf; |
667 | } | 667 | } |
668 | 668 | ||
669 | static void nfs_refresh_verifier(struct dentry * dentry, unsigned long verf) | 669 | 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) | |||
869 | if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { | 869 | if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { |
870 | lock_kernel(); | 870 | lock_kernel(); |
871 | drop_nlink(inode); | 871 | drop_nlink(inode); |
872 | nfs_complete_unlink(dentry); | 872 | nfs_complete_unlink(dentry, inode); |
873 | unlock_kernel(); | 873 | unlock_kernel(); |
874 | } | 874 | } |
875 | /* When creating a negative dentry, we want to renew d_time */ | 875 | /* When creating a negative dentry, we want to renew d_time */ |
@@ -897,14 +897,13 @@ int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd) | |||
897 | return (nd->intent.open.flags & O_EXCL) != 0; | 897 | return (nd->intent.open.flags & O_EXCL) != 0; |
898 | } | 898 | } |
899 | 899 | ||
900 | static inline int nfs_reval_fsid(struct vfsmount *mnt, struct inode *dir, | 900 | static inline int nfs_reval_fsid(struct inode *dir, const struct nfs_fattr *fattr) |
901 | struct nfs_fh *fh, struct nfs_fattr *fattr) | ||
902 | { | 901 | { |
903 | struct nfs_server *server = NFS_SERVER(dir); | 902 | struct nfs_server *server = NFS_SERVER(dir); |
904 | 903 | ||
905 | if (!nfs_fsid_equal(&server->fsid, &fattr->fsid)) | 904 | if (!nfs_fsid_equal(&server->fsid, &fattr->fsid)) |
906 | /* Revalidate fsid on root dir */ | 905 | /* Revalidate fsid using the parent directory */ |
907 | return __nfs_revalidate_inode(server, mnt->mnt_root->d_inode); | 906 | return __nfs_revalidate_inode(server, dir); |
908 | return 0; | 907 | return 0; |
909 | } | 908 | } |
910 | 909 | ||
@@ -946,7 +945,7 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru | |||
946 | res = ERR_PTR(error); | 945 | res = ERR_PTR(error); |
947 | goto out_unlock; | 946 | goto out_unlock; |
948 | } | 947 | } |
949 | error = nfs_reval_fsid(nd->mnt, dir, &fhandle, &fattr); | 948 | error = nfs_reval_fsid(dir, &fattr); |
950 | if (error < 0) { | 949 | if (error < 0) { |
951 | res = ERR_PTR(error); | 950 | res = ERR_PTR(error); |
952 | goto out_unlock; | 951 | goto out_unlock; |
@@ -1244,7 +1243,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
1244 | attr.ia_mode = mode; | 1243 | attr.ia_mode = mode; |
1245 | attr.ia_valid = ATTR_MODE; | 1244 | attr.ia_valid = ATTR_MODE; |
1246 | 1245 | ||
1247 | if (nd && (nd->flags & LOOKUP_CREATE)) | 1246 | if ((nd->flags & LOOKUP_CREATE) != 0) |
1248 | open_flags = nd->intent.open.flags; | 1247 | open_flags = nd->intent.open.flags; |
1249 | 1248 | ||
1250 | lock_kernel(); | 1249 | lock_kernel(); |
@@ -1412,7 +1411,7 @@ static int nfs_sillyrename(struct inode *dir, struct dentry *dentry) | |||
1412 | nfs_renew_times(dentry); | 1411 | nfs_renew_times(dentry); |
1413 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1412 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1414 | d_move(dentry, sdentry); | 1413 | d_move(dentry, sdentry); |
1415 | error = nfs_async_unlink(dentry); | 1414 | error = nfs_async_unlink(dir, dentry); |
1416 | /* If we return 0 we don't unlink */ | 1415 | /* If we return 0 we don't unlink */ |
1417 | } | 1416 | } |
1418 | dput(sdentry); | 1417 | dput(sdentry); |
@@ -1535,7 +1534,7 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym | |||
1535 | 1534 | ||
1536 | lock_kernel(); | 1535 | lock_kernel(); |
1537 | 1536 | ||
1538 | page = alloc_page(GFP_KERNEL); | 1537 | page = alloc_page(GFP_HIGHUSER); |
1539 | if (!page) { | 1538 | if (!page) { |
1540 | unlock_kernel(); | 1539 | unlock_kernel(); |
1541 | return -ENOMEM; | 1540 | return -ENOMEM; |
@@ -1744,8 +1743,8 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask) | |||
1744 | struct nfs_inode *nfsi; | 1743 | struct nfs_inode *nfsi; |
1745 | struct nfs_access_entry *cache; | 1744 | struct nfs_access_entry *cache; |
1746 | 1745 | ||
1747 | spin_lock(&nfs_access_lru_lock); | ||
1748 | restart: | 1746 | restart: |
1747 | spin_lock(&nfs_access_lru_lock); | ||
1749 | list_for_each_entry(nfsi, &nfs_access_lru_list, access_cache_inode_lru) { | 1748 | list_for_each_entry(nfsi, &nfs_access_lru_list, access_cache_inode_lru) { |
1750 | struct inode *inode; | 1749 | struct inode *inode; |
1751 | 1750 | ||
@@ -1770,6 +1769,7 @@ remove_lru_entry: | |||
1770 | clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags); | 1769 | clear_bit(NFS_INO_ACL_LRU_SET, &nfsi->flags); |
1771 | } | 1770 | } |
1772 | spin_unlock(&inode->i_lock); | 1771 | spin_unlock(&inode->i_lock); |
1772 | spin_unlock(&nfs_access_lru_lock); | ||
1773 | iput(inode); | 1773 | iput(inode); |
1774 | goto restart; | 1774 | goto restart; |
1775 | } | 1775 | } |