diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-30 16:51:43 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-30 16:51:43 -0500 |
commit | 08cc36cbd1ee7d86422713bb21551eed1326b894 (patch) | |
tree | 52cc683387f903b34a7f6f798dcdbae385b58db8 /fs/nfs/inode.c | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) | |
parent | 46f72f57d279688c4524df78edb5738db730eeef (diff) | |
download | linux-08cc36cbd1ee7d86422713bb21551eed1326b894.tar.gz linux-08cc36cbd1ee7d86422713bb21551eed1326b894.tar.bz2 linux-08cc36cbd1ee7d86422713bb21551eed1326b894.zip |
Merge branch 'devel' into next
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index d22eb383e1cf..0c381686171e 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -592,7 +592,7 @@ static void nfs_file_set_open_context(struct file *filp, struct nfs_open_context /* * Given an inode, search for an open context with the desired characteristics */ -struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode) +struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode) { struct nfs_inode *nfsi = NFS_I(inode); struct nfs_open_context *pos, *ctx = NULL; @@ -712,14 +712,7 @@ int nfs_attribute_timeout(struct inode *inode) if (nfs_have_delegation(inode, FMODE_READ)) return 0; - /* - * Special case: if the attribute timeout is set to 0, then always - * treat the cache as having expired (unless holding - * a delegation). - */ - if (nfsi->attrtimeo == 0) - return 1; - return !time_in_range(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); + return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); } /** @@ -1182,7 +1175,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) nfsi->attrtimeo_timestamp = now; nfsi->attr_gencount = nfs_inc_attr_generation_counter(); } else { - if (!time_in_range(now, nfsi->attrtimeo_timestamp, nfsi->attrtimeo_timestamp + nfsi->attrtimeo)) { + if (!time_in_range_open(now, nfsi->attrtimeo_timestamp, nfsi->attrtimeo_timestamp + nfsi->attrtimeo)) { if ((nfsi->attrtimeo <<= 1) > NFS_MAXATTRTIMEO(inode)) nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); nfsi->attrtimeo_timestamp = now; |