diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index dbc09271af02..1293e0acd82b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -73,7 +73,7 @@ int nfs4_map_errors(int err) | |||
73 | { | 73 | { |
74 | if (err < -1000) { | 74 | if (err < -1000) { |
75 | dprintk("%s could not handle NFSv4 error %d\n", | 75 | dprintk("%s could not handle NFSv4 error %d\n", |
76 | __FUNCTION__, -err); | 76 | __func__, -err); |
77 | return -EIO; | 77 | return -EIO; |
78 | } | 78 | } |
79 | return err; | 79 | return err; |
@@ -306,8 +306,7 @@ static void nfs4_opendata_free(struct kref *kref) | |||
306 | nfs4_put_open_state(p->state); | 306 | nfs4_put_open_state(p->state); |
307 | nfs4_put_state_owner(p->owner); | 307 | nfs4_put_state_owner(p->owner); |
308 | dput(p->dir); | 308 | dput(p->dir); |
309 | dput(p->path.dentry); | 309 | path_put(&p->path); |
310 | mntput(p->path.mnt); | ||
311 | kfree(p); | 310 | kfree(p); |
312 | } | 311 | } |
313 | 312 | ||
@@ -1210,8 +1209,7 @@ static void nfs4_free_closedata(void *data) | |||
1210 | nfs4_put_open_state(calldata->state); | 1209 | nfs4_put_open_state(calldata->state); |
1211 | nfs_free_seqid(calldata->arg.seqid); | 1210 | nfs_free_seqid(calldata->arg.seqid); |
1212 | nfs4_put_state_owner(sp); | 1211 | nfs4_put_state_owner(sp); |
1213 | dput(calldata->path.dentry); | 1212 | path_put(&calldata->path); |
1214 | mntput(calldata->path.mnt); | ||
1215 | kfree(calldata); | 1213 | kfree(calldata); |
1216 | } | 1214 | } |
1217 | 1215 | ||
@@ -1578,7 +1576,7 @@ static int nfs4_get_referral(struct inode *dir, const struct qstr *name, struct | |||
1578 | goto out; | 1576 | goto out; |
1579 | /* Make sure server returned a different fsid for the referral */ | 1577 | /* Make sure server returned a different fsid for the referral */ |
1580 | if (nfs_fsid_equal(&NFS_SERVER(dir)->fsid, &locations->fattr.fsid)) { | 1578 | if (nfs_fsid_equal(&NFS_SERVER(dir)->fsid, &locations->fattr.fsid)) { |
1581 | dprintk("%s: server did not return a different fsid for a referral at %s\n", __FUNCTION__, name->name); | 1579 | dprintk("%s: server did not return a different fsid for a referral at %s\n", __func__, name->name); |
1582 | status = -EIO; | 1580 | status = -EIO; |
1583 | goto out; | 1581 | goto out; |
1584 | } | 1582 | } |
@@ -2211,7 +2209,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, | |||
2211 | }; | 2209 | }; |
2212 | int status; | 2210 | int status; |
2213 | 2211 | ||
2214 | dprintk("%s: dentry = %s/%s, cookie = %Lu\n", __FUNCTION__, | 2212 | dprintk("%s: dentry = %s/%s, cookie = %Lu\n", __func__, |
2215 | dentry->d_parent->d_name.name, | 2213 | dentry->d_parent->d_name.name, |
2216 | dentry->d_name.name, | 2214 | dentry->d_name.name, |
2217 | (unsigned long long)cookie); | 2215 | (unsigned long long)cookie); |
@@ -2223,7 +2221,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, | |||
2223 | 2221 | ||
2224 | nfs_invalidate_atime(dir); | 2222 | nfs_invalidate_atime(dir); |
2225 | 2223 | ||
2226 | dprintk("%s: returns %d\n", __FUNCTION__, status); | 2224 | dprintk("%s: returns %d\n", __func__, status); |
2227 | return status; | 2225 | return status; |
2228 | } | 2226 | } |
2229 | 2227 | ||
@@ -3342,7 +3340,7 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata) | |||
3342 | struct nfs4_lockdata *data = calldata; | 3340 | struct nfs4_lockdata *data = calldata; |
3343 | struct nfs4_state *state = data->lsp->ls_state; | 3341 | struct nfs4_state *state = data->lsp->ls_state; |
3344 | 3342 | ||
3345 | dprintk("%s: begin!\n", __FUNCTION__); | 3343 | dprintk("%s: begin!\n", __func__); |
3346 | if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0) | 3344 | if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0) |
3347 | return; | 3345 | return; |
3348 | /* Do we need to do an open_to_lock_owner? */ | 3346 | /* Do we need to do an open_to_lock_owner? */ |
@@ -3356,14 +3354,14 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata) | |||
3356 | data->arg.new_lock_owner = 0; | 3354 | data->arg.new_lock_owner = 0; |
3357 | data->timestamp = jiffies; | 3355 | data->timestamp = jiffies; |
3358 | rpc_call_start(task); | 3356 | rpc_call_start(task); |
3359 | dprintk("%s: done!, ret = %d\n", __FUNCTION__, data->rpc_status); | 3357 | dprintk("%s: done!, ret = %d\n", __func__, data->rpc_status); |
3360 | } | 3358 | } |
3361 | 3359 | ||
3362 | static void nfs4_lock_done(struct rpc_task *task, void *calldata) | 3360 | static void nfs4_lock_done(struct rpc_task *task, void *calldata) |
3363 | { | 3361 | { |
3364 | struct nfs4_lockdata *data = calldata; | 3362 | struct nfs4_lockdata *data = calldata; |
3365 | 3363 | ||
3366 | dprintk("%s: begin!\n", __FUNCTION__); | 3364 | dprintk("%s: begin!\n", __func__); |
3367 | 3365 | ||
3368 | data->rpc_status = task->tk_status; | 3366 | data->rpc_status = task->tk_status; |
3369 | if (RPC_ASSASSINATED(task)) | 3367 | if (RPC_ASSASSINATED(task)) |
@@ -3381,14 +3379,14 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) | |||
3381 | renew_lease(NFS_SERVER(data->ctx->path.dentry->d_inode), data->timestamp); | 3379 | renew_lease(NFS_SERVER(data->ctx->path.dentry->d_inode), data->timestamp); |
3382 | } | 3380 | } |
3383 | out: | 3381 | out: |
3384 | dprintk("%s: done, ret = %d!\n", __FUNCTION__, data->rpc_status); | 3382 | dprintk("%s: done, ret = %d!\n", __func__, data->rpc_status); |
3385 | } | 3383 | } |
3386 | 3384 | ||
3387 | static void nfs4_lock_release(void *calldata) | 3385 | static void nfs4_lock_release(void *calldata) |
3388 | { | 3386 | { |
3389 | struct nfs4_lockdata *data = calldata; | 3387 | struct nfs4_lockdata *data = calldata; |
3390 | 3388 | ||
3391 | dprintk("%s: begin!\n", __FUNCTION__); | 3389 | dprintk("%s: begin!\n", __func__); |
3392 | nfs_free_seqid(data->arg.open_seqid); | 3390 | nfs_free_seqid(data->arg.open_seqid); |
3393 | if (data->cancelled != 0) { | 3391 | if (data->cancelled != 0) { |
3394 | struct rpc_task *task; | 3392 | struct rpc_task *task; |
@@ -3396,13 +3394,13 @@ static void nfs4_lock_release(void *calldata) | |||
3396 | data->arg.lock_seqid); | 3394 | data->arg.lock_seqid); |
3397 | if (!IS_ERR(task)) | 3395 | if (!IS_ERR(task)) |
3398 | rpc_put_task(task); | 3396 | rpc_put_task(task); |
3399 | dprintk("%s: cancelling lock!\n", __FUNCTION__); | 3397 | dprintk("%s: cancelling lock!\n", __func__); |
3400 | } else | 3398 | } else |
3401 | nfs_free_seqid(data->arg.lock_seqid); | 3399 | nfs_free_seqid(data->arg.lock_seqid); |
3402 | nfs4_put_lock_state(data->lsp); | 3400 | nfs4_put_lock_state(data->lsp); |
3403 | put_nfs_open_context(data->ctx); | 3401 | put_nfs_open_context(data->ctx); |
3404 | kfree(data); | 3402 | kfree(data); |
3405 | dprintk("%s: done!\n", __FUNCTION__); | 3403 | dprintk("%s: done!\n", __func__); |
3406 | } | 3404 | } |
3407 | 3405 | ||
3408 | static const struct rpc_call_ops nfs4_lock_ops = { | 3406 | static const struct rpc_call_ops nfs4_lock_ops = { |
@@ -3428,7 +3426,7 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f | |||
3428 | }; | 3426 | }; |
3429 | int ret; | 3427 | int ret; |
3430 | 3428 | ||
3431 | dprintk("%s: begin!\n", __FUNCTION__); | 3429 | dprintk("%s: begin!\n", __func__); |
3432 | data = nfs4_alloc_lockdata(fl, nfs_file_open_context(fl->fl_file), | 3430 | data = nfs4_alloc_lockdata(fl, nfs_file_open_context(fl->fl_file), |
3433 | fl->fl_u.nfs4_fl.owner); | 3431 | fl->fl_u.nfs4_fl.owner); |
3434 | if (data == NULL) | 3432 | if (data == NULL) |
@@ -3451,7 +3449,7 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f | |||
3451 | } else | 3449 | } else |
3452 | data->cancelled = 1; | 3450 | data->cancelled = 1; |
3453 | rpc_put_task(task); | 3451 | rpc_put_task(task); |
3454 | dprintk("%s: done, ret = %d!\n", __FUNCTION__, ret); | 3452 | dprintk("%s: done, ret = %d!\n", __func__, ret); |
3455 | return ret; | 3453 | return ret; |
3456 | } | 3454 | } |
3457 | 3455 | ||
@@ -3527,7 +3525,7 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock | |||
3527 | /* Note: we always want to sleep here! */ | 3525 | /* Note: we always want to sleep here! */ |
3528 | request->fl_flags = fl_flags | FL_SLEEP; | 3526 | request->fl_flags = fl_flags | FL_SLEEP; |
3529 | if (do_vfs_lock(request->fl_file, request) < 0) | 3527 | if (do_vfs_lock(request->fl_file, request) < 0) |
3530 | printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __FUNCTION__); | 3528 | printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __func__); |
3531 | out_unlock: | 3529 | out_unlock: |
3532 | up_read(&clp->cl_sem); | 3530 | up_read(&clp->cl_sem); |
3533 | out: | 3531 | out: |
@@ -3665,12 +3663,12 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, | |||
3665 | }; | 3663 | }; |
3666 | int status; | 3664 | int status; |
3667 | 3665 | ||
3668 | dprintk("%s: start\n", __FUNCTION__); | 3666 | dprintk("%s: start\n", __func__); |
3669 | nfs_fattr_init(&fs_locations->fattr); | 3667 | nfs_fattr_init(&fs_locations->fattr); |
3670 | fs_locations->server = server; | 3668 | fs_locations->server = server; |
3671 | fs_locations->nlocations = 0; | 3669 | fs_locations->nlocations = 0; |
3672 | status = rpc_call_sync(server->client, &msg, 0); | 3670 | status = rpc_call_sync(server->client, &msg, 0); |
3673 | dprintk("%s: returned status = %d\n", __FUNCTION__, status); | 3671 | dprintk("%s: returned status = %d\n", __func__, status); |
3674 | return status; | 3672 | return status; |
3675 | } | 3673 | } |
3676 | 3674 | ||