| .. | .. |
|---|
| 108 | 108 | .rpc_resp = fattr, |
|---|
| 109 | 109 | }; |
|---|
| 110 | 110 | int status; |
|---|
| 111 | + unsigned short task_flags = 0; |
|---|
| 112 | + |
|---|
| 113 | + /* Is this is an attribute revalidation, subject to softreval? */ |
|---|
| 114 | + if (inode && (server->flags & NFS_MOUNT_SOFTREVAL)) |
|---|
| 115 | + task_flags |= RPC_TASK_TIMEOUT; |
|---|
| 111 | 116 | |
|---|
| 112 | 117 | dprintk("NFS call getattr\n"); |
|---|
| 113 | 118 | nfs_fattr_init(fattr); |
|---|
| 114 | | - status = rpc_call_sync(server->client, &msg, 0); |
|---|
| 119 | + status = rpc_call_sync(server->client, &msg, task_flags); |
|---|
| 115 | 120 | dprintk("NFS reply getattr: %d\n", status); |
|---|
| 116 | 121 | return status; |
|---|
| 117 | 122 | } |
|---|
| .. | .. |
|---|
| 147 | 152 | } |
|---|
| 148 | 153 | |
|---|
| 149 | 154 | static int |
|---|
| 150 | | -nfs_proc_lookup(struct inode *dir, const struct qstr *name, |
|---|
| 155 | +nfs_proc_lookup(struct inode *dir, struct dentry *dentry, |
|---|
| 151 | 156 | struct nfs_fh *fhandle, struct nfs_fattr *fattr, |
|---|
| 152 | 157 | struct nfs4_label *label) |
|---|
| 153 | 158 | { |
|---|
| 154 | 159 | struct nfs_diropargs arg = { |
|---|
| 155 | 160 | .fh = NFS_FH(dir), |
|---|
| 156 | | - .name = name->name, |
|---|
| 157 | | - .len = name->len |
|---|
| 161 | + .name = dentry->d_name.name, |
|---|
| 162 | + .len = dentry->d_name.len |
|---|
| 158 | 163 | }; |
|---|
| 159 | 164 | struct nfs_diropok res = { |
|---|
| 160 | 165 | .fh = fhandle, |
|---|
| .. | .. |
|---|
| 166 | 171 | .rpc_resp = &res, |
|---|
| 167 | 172 | }; |
|---|
| 168 | 173 | int status; |
|---|
| 174 | + unsigned short task_flags = 0; |
|---|
| 169 | 175 | |
|---|
| 170 | | - dprintk("NFS call lookup %s\n", name->name); |
|---|
| 176 | + /* Is this is an attribute revalidation, subject to softreval? */ |
|---|
| 177 | + if (nfs_lookup_is_soft_revalidate(dentry)) |
|---|
| 178 | + task_flags |= RPC_TASK_TIMEOUT; |
|---|
| 179 | + |
|---|
| 180 | + dprintk("NFS call lookup %pd2\n", dentry); |
|---|
| 171 | 181 | nfs_fattr_init(fattr); |
|---|
| 172 | | - status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
|---|
| 182 | + status = rpc_call_sync(NFS_CLIENT(dir), &msg, task_flags); |
|---|
| 173 | 183 | dprintk("NFS reply lookup: %d\n", status); |
|---|
| 174 | 184 | return status; |
|---|
| 175 | 185 | } |
|---|
| .. | .. |
|---|
| 490 | 500 | * from nfs_readdir by calling the decode_entry function directly. |
|---|
| 491 | 501 | */ |
|---|
| 492 | 502 | static int |
|---|
| 493 | | -nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, |
|---|
| 503 | +nfs_proc_readdir(struct dentry *dentry, const struct cred *cred, |
|---|
| 494 | 504 | u64 cookie, struct page **pages, unsigned int count, bool plus) |
|---|
| 495 | 505 | { |
|---|
| 496 | 506 | struct inode *dir = d_inode(dentry); |
|---|
| .. | .. |
|---|
| 710 | 720 | .file_ops = &nfs_file_operations, |
|---|
| 711 | 721 | .getroot = nfs_proc_get_root, |
|---|
| 712 | 722 | .submount = nfs_submount, |
|---|
| 713 | | - .try_mount = nfs_try_mount, |
|---|
| 723 | + .try_get_tree = nfs_try_get_tree, |
|---|
| 714 | 724 | .getattr = nfs_proc_getattr, |
|---|
| 715 | 725 | .setattr = nfs_proc_setattr, |
|---|
| 716 | 726 | .lookup = nfs_proc_lookup, |
|---|