aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index 8fef86523d7f..5ef28f08f424 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -61,7 +61,7 @@ nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
61 int status; 61 int status;
62 62
63 dprintk("%s: call getattr\n", __FUNCTION__); 63 dprintk("%s: call getattr\n", __FUNCTION__);
64 fattr->valid = 0; 64 nfs_fattr_init(fattr);
65 status = rpc_call(server->client_sys, NFSPROC_GETATTR, fhandle, fattr, 0); 65 status = rpc_call(server->client_sys, NFSPROC_GETATTR, fhandle, fattr, 0);
66 dprintk("%s: reply getattr: %d\n", __FUNCTION__, status); 66 dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
67 if (status) 67 if (status)
@@ -93,7 +93,7 @@ nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
93 int status; 93 int status;
94 94
95 dprintk("NFS call getattr\n"); 95 dprintk("NFS call getattr\n");
96 fattr->valid = 0; 96 nfs_fattr_init(fattr);
97 status = rpc_call(server->client, NFSPROC_GETATTR, 97 status = rpc_call(server->client, NFSPROC_GETATTR,
98 fhandle, fattr, 0); 98 fhandle, fattr, 0);
99 dprintk("NFS reply getattr: %d\n", status); 99 dprintk("NFS reply getattr: %d\n", status);
@@ -112,7 +112,7 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
112 int status; 112 int status;
113 113
114 dprintk("NFS call setattr\n"); 114 dprintk("NFS call setattr\n");
115 fattr->valid = 0; 115 nfs_fattr_init(fattr);
116 status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0); 116 status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0);
117 if (status == 0) 117 if (status == 0)
118 nfs_setattr_update_inode(inode, sattr); 118 nfs_setattr_update_inode(inode, sattr);
@@ -136,7 +136,7 @@ nfs_proc_lookup(struct inode *dir, struct qstr *name,
136 int status; 136 int status;
137 137
138 dprintk("NFS call lookup %s\n", name->name); 138 dprintk("NFS call lookup %s\n", name->name);
139 fattr->valid = 0; 139 nfs_fattr_init(fattr);
140 status = rpc_call(NFS_CLIENT(dir), NFSPROC_LOOKUP, &arg, &res, 0); 140 status = rpc_call(NFS_CLIENT(dir), NFSPROC_LOOKUP, &arg, &res, 0);
141 dprintk("NFS reply lookup: %d\n", status); 141 dprintk("NFS reply lookup: %d\n", status);
142 return status; 142 return status;
@@ -174,7 +174,7 @@ static int nfs_proc_read(struct nfs_read_data *rdata)
174 174
175 dprintk("NFS call read %d @ %Ld\n", rdata->args.count, 175 dprintk("NFS call read %d @ %Ld\n", rdata->args.count,
176 (long long) rdata->args.offset); 176 (long long) rdata->args.offset);
177 fattr->valid = 0; 177 nfs_fattr_init(fattr);
178 status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags); 178 status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags);
179 if (status >= 0) { 179 if (status >= 0) {
180 nfs_refresh_inode(inode, fattr); 180 nfs_refresh_inode(inode, fattr);
@@ -203,7 +203,7 @@ static int nfs_proc_write(struct nfs_write_data *wdata)
203 203
204 dprintk("NFS call write %d @ %Ld\n", wdata->args.count, 204 dprintk("NFS call write %d @ %Ld\n", wdata->args.count,
205 (long long) wdata->args.offset); 205 (long long) wdata->args.offset);
206 fattr->valid = 0; 206 nfs_fattr_init(fattr);
207 status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags); 207 status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags);
208 if (status >= 0) { 208 if (status >= 0) {
209 nfs_refresh_inode(inode, fattr); 209 nfs_refresh_inode(inode, fattr);
@@ -232,7 +232,7 @@ nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
232 }; 232 };
233 int status; 233 int status;
234 234
235 fattr.valid = 0; 235 nfs_fattr_init(&fattr);
236 dprintk("NFS call create %s\n", dentry->d_name.name); 236 dprintk("NFS call create %s\n", dentry->d_name.name);
237 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0); 237 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
238 if (status == 0) 238 if (status == 0)
@@ -273,12 +273,12 @@ nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
273 sattr->ia_size = new_encode_dev(rdev);/* get out your barf bag */ 273 sattr->ia_size = new_encode_dev(rdev);/* get out your barf bag */
274 } 274 }
275 275
276 fattr.valid = 0; 276 nfs_fattr_init(&fattr);
277 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0); 277 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
278 278
279 if (status == -EINVAL && S_ISFIFO(mode)) { 279 if (status == -EINVAL && S_ISFIFO(mode)) {
280 sattr->ia_mode = mode; 280 sattr->ia_mode = mode;
281 fattr.valid = 0; 281 nfs_fattr_init(&fattr);
282 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0); 282 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
283 } 283 }
284 if (status == 0) 284 if (status == 0)
@@ -391,7 +391,7 @@ nfs_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
391 if (path->len > NFS2_MAXPATHLEN) 391 if (path->len > NFS2_MAXPATHLEN)
392 return -ENAMETOOLONG; 392 return -ENAMETOOLONG;
393 dprintk("NFS call symlink %s -> %s\n", name->name, path->name); 393 dprintk("NFS call symlink %s -> %s\n", name->name, path->name);
394 fattr->valid = 0; 394 nfs_fattr_init(fattr);
395 fhandle->size = 0; 395 fhandle->size = 0;
396 status = rpc_call(NFS_CLIENT(dir), NFSPROC_SYMLINK, &arg, NULL, 0); 396 status = rpc_call(NFS_CLIENT(dir), NFSPROC_SYMLINK, &arg, NULL, 0);
397 dprintk("NFS reply symlink: %d\n", status); 397 dprintk("NFS reply symlink: %d\n", status);
@@ -416,7 +416,7 @@ nfs_proc_mkdir(struct inode *dir, struct dentry *dentry, struct iattr *sattr)
416 int status; 416 int status;
417 417
418 dprintk("NFS call mkdir %s\n", dentry->d_name.name); 418 dprintk("NFS call mkdir %s\n", dentry->d_name.name);
419 fattr.valid = 0; 419 nfs_fattr_init(&fattr);
420 status = rpc_call(NFS_CLIENT(dir), NFSPROC_MKDIR, &arg, &res, 0); 420 status = rpc_call(NFS_CLIENT(dir), NFSPROC_MKDIR, &arg, &res, 0);
421 if (status == 0) 421 if (status == 0)
422 status = nfs_instantiate(dentry, &fhandle, &fattr); 422 status = nfs_instantiate(dentry, &fhandle, &fattr);
@@ -484,7 +484,7 @@ nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
484 int status; 484 int status;
485 485
486 dprintk("NFS call statfs\n"); 486 dprintk("NFS call statfs\n");
487 stat->fattr->valid = 0; 487 nfs_fattr_init(stat->fattr);
488 status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0); 488 status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0);
489 dprintk("NFS reply statfs: %d\n", status); 489 dprintk("NFS reply statfs: %d\n", status);
490 if (status) 490 if (status)
@@ -507,7 +507,7 @@ nfs_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
507 int status; 507 int status;
508 508
509 dprintk("NFS call fsinfo\n"); 509 dprintk("NFS call fsinfo\n");
510 info->fattr->valid = 0; 510 nfs_fattr_init(info->fattr);
511 status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0); 511 status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0);
512 dprintk("NFS reply fsinfo: %d\n", status); 512 dprintk("NFS reply fsinfo: %d\n", status);
513 if (status) 513 if (status)