diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 5cb3345eb694..596c5d8e86f4 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -541,8 +541,7 @@ static void __put_nfs_open_context(struct nfs_open_context *ctx, int wait) | |||
541 | } | 541 | } |
542 | if (ctx->cred != NULL) | 542 | if (ctx->cred != NULL) |
543 | put_rpccred(ctx->cred); | 543 | put_rpccred(ctx->cred); |
544 | dput(ctx->path.dentry); | 544 | path_put(&ctx->path); |
545 | mntput(ctx->path.mnt); | ||
546 | kfree(ctx); | 545 | kfree(ctx); |
547 | } | 546 | } |
548 | 547 | ||
@@ -707,6 +706,13 @@ int nfs_attribute_timeout(struct inode *inode) | |||
707 | 706 | ||
708 | if (nfs_have_delegation(inode, FMODE_READ)) | 707 | if (nfs_have_delegation(inode, FMODE_READ)) |
709 | return 0; | 708 | return 0; |
709 | /* | ||
710 | * Special case: if the attribute timeout is set to 0, then always | ||
711 | * treat the cache as having expired (unless holding | ||
712 | * a delegation). | ||
713 | */ | ||
714 | if (nfsi->attrtimeo == 0) | ||
715 | return 1; | ||
710 | return !time_in_range(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); | 716 | return !time_in_range(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); |
711 | } | 717 | } |
712 | 718 | ||
@@ -995,7 +1001,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
995 | unsigned long now = jiffies; | 1001 | unsigned long now = jiffies; |
996 | 1002 | ||
997 | dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", | 1003 | dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", |
998 | __FUNCTION__, inode->i_sb->s_id, inode->i_ino, | 1004 | __func__, inode->i_sb->s_id, inode->i_ino, |
999 | atomic_read(&inode->i_count), fattr->valid); | 1005 | atomic_read(&inode->i_count), fattr->valid); |
1000 | 1006 | ||
1001 | if (nfsi->fileid != fattr->fileid) | 1007 | if (nfsi->fileid != fattr->fileid) |
@@ -1119,7 +1125,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1119 | * Big trouble! The inode has become a different object. | 1125 | * Big trouble! The inode has become a different object. |
1120 | */ | 1126 | */ |
1121 | printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", | 1127 | printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", |
1122 | __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); | 1128 | __func__, inode->i_ino, inode->i_mode, fattr->mode); |
1123 | out_err: | 1129 | out_err: |
1124 | /* | 1130 | /* |
1125 | * No need to worry about unhashing the dentry, as the | 1131 | * No need to worry about unhashing the dentry, as the |