diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 16:50:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 16:50:52 -0400 |
commit | cff6bf970965c98c62007fc8a36527fd147fe233 (patch) | |
tree | 2791f2208b54ade86625af416ff5342f11282f0c /fs/nfs | |
parent | 6cd7525a00f3b926e8bd2e402954ed3e09a8e924 (diff) | |
parent | 39ca371c45b04cd50d0974030ae051906fc516b6 (diff) |
Merge /home/trondmy/scm/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/delegation.c | 4 | ||||
-rw-r--r-- | fs/nfs/file.c | 3 | ||||
-rw-r--r-- | fs/nfs/inode.c | 9 |
3 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index d7f7eb669d0..4a36839f0bb 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -85,6 +85,10 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
85 | struct nfs_delegation *delegation; | 85 | struct nfs_delegation *delegation; |
86 | int status = 0; | 86 | int status = 0; |
87 | 87 | ||
88 | /* Ensure we first revalidate the attributes and page cache! */ | ||
89 | if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))) | ||
90 | __nfs_revalidate_inode(NFS_SERVER(inode), inode); | ||
91 | |||
88 | delegation = nfs_alloc_delegation(); | 92 | delegation = nfs_alloc_delegation(); |
89 | if (delegation == NULL) | 93 | if (delegation == NULL) |
90 | return -ENOMEM; | 94 | return -ENOMEM; |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index f6b9eda925c..6bdcfa95de9 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -137,7 +137,8 @@ static int nfs_revalidate_file(struct inode *inode, struct file *filp) | |||
137 | struct nfs_inode *nfsi = NFS_I(inode); | 137 | struct nfs_inode *nfsi = NFS_I(inode); |
138 | int retval = 0; | 138 | int retval = 0; |
139 | 139 | ||
140 | if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE) || nfs_attribute_timeout(inode)) | 140 | if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR)) |
141 | || nfs_attribute_timeout(inode)) | ||
141 | retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode); | 142 | retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode); |
142 | nfs_revalidate_mapping(inode, filp->f_mapping); | 143 | nfs_revalidate_mapping(inode, filp->f_mapping); |
143 | return 0; | 144 | return 0; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 358d8ef8c08..d7abaa00473 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -909,12 +909,10 @@ static int nfs_wait_on_inode(struct inode *inode) | |||
909 | sigset_t oldmask; | 909 | sigset_t oldmask; |
910 | int error; | 910 | int error; |
911 | 911 | ||
912 | atomic_inc(&inode->i_count); | ||
913 | rpc_clnt_sigmask(clnt, &oldmask); | 912 | rpc_clnt_sigmask(clnt, &oldmask); |
914 | error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING, | 913 | error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING, |
915 | nfs_wait_schedule, TASK_INTERRUPTIBLE); | 914 | nfs_wait_schedule, TASK_INTERRUPTIBLE); |
916 | rpc_clnt_sigunmask(clnt, &oldmask); | 915 | rpc_clnt_sigunmask(clnt, &oldmask); |
917 | iput(inode); | ||
918 | 916 | ||
919 | return error; | 917 | return error; |
920 | } | 918 | } |
@@ -1258,10 +1256,6 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1258 | loff_t cur_size, new_isize; | 1256 | loff_t cur_size, new_isize; |
1259 | int data_unstable; | 1257 | int data_unstable; |
1260 | 1258 | ||
1261 | /* Do we hold a delegation? */ | ||
1262 | if (nfs_have_delegation(inode, FMODE_READ)) | ||
1263 | return 0; | ||
1264 | |||
1265 | spin_lock(&inode->i_lock); | 1259 | spin_lock(&inode->i_lock); |
1266 | 1260 | ||
1267 | /* Are we in the process of updating data on the server? */ | 1261 | /* Are we in the process of updating data on the server? */ |
@@ -1382,7 +1376,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign | |||
1382 | nfsi->read_cache_jiffies = fattr->timestamp; | 1376 | nfsi->read_cache_jiffies = fattr->timestamp; |
1383 | 1377 | ||
1384 | /* Are we racing with known updates of the metadata on the server? */ | 1378 | /* Are we racing with known updates of the metadata on the server? */ |
1385 | data_unstable = ! nfs_verify_change_attribute(inode, verifier); | 1379 | data_unstable = ! (nfs_verify_change_attribute(inode, verifier) || |
1380 | (nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)); | ||
1386 | 1381 | ||
1387 | /* Check if our cached file size is stale */ | 1382 | /* Check if our cached file size is stale */ |
1388 | new_isize = nfs_size_to_loff_t(fattr->size); | 1383 | new_isize = nfs_size_to_loff_t(fattr->size); |