diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-06-16 09:52:26 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-06-22 13:24:02 -0400 |
commit | df8964554a4e19c8ddcc4d9c642c4d267662d770 (patch) | |
tree | aa4b48577025ab5cfb578887cbbb6ac9184bd01e /fs/nfs/nfs4proc.c | |
parent | 035168ab39f66e4946d493f9ee20d11e154f332a (diff) |
NFSv41: Further cleanup for nfs4_sequence_done
Instead of testing if the nfs_client has a session, we should be testing if
the struct nfs4_sequence_res was set up with one.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 0168007b78d2..a896bfbd520a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -430,6 +430,13 @@ out: | |||
430 | nfs41_sequence_free_slot(res); | 430 | nfs41_sequence_free_slot(res); |
431 | } | 431 | } |
432 | 432 | ||
433 | static void nfs4_sequence_done(const struct nfs_server *server, | ||
434 | struct nfs4_sequence_res *res, int rpc_status) | ||
435 | { | ||
436 | if (res->sr_session != NULL) | ||
437 | nfs41_sequence_done(res); | ||
438 | } | ||
439 | |||
433 | /* | 440 | /* |
434 | * nfs4_find_slot - efficiently look for a free slot | 441 | * nfs4_find_slot - efficiently look for a free slot |
435 | * | 442 | * |
@@ -642,6 +649,11 @@ int _nfs4_call_sync_session(struct nfs_server *server, | |||
642 | return nfs4_call_sync_sequence(server, msg, args, res, cache_reply, 0); | 649 | return nfs4_call_sync_sequence(server, msg, args, res, cache_reply, 0); |
643 | } | 650 | } |
644 | 651 | ||
652 | #else | ||
653 | static void nfs4_sequence_done(const struct nfs_server *server, | ||
654 | struct nfs4_sequence_res *res, int rpc_status) | ||
655 | { | ||
656 | } | ||
645 | #endif /* CONFIG_NFS_V4_1 */ | 657 | #endif /* CONFIG_NFS_V4_1 */ |
646 | 658 | ||
647 | int _nfs4_call_sync(struct nfs_server *server, | 659 | int _nfs4_call_sync(struct nfs_server *server, |
@@ -658,15 +670,6 @@ int _nfs4_call_sync(struct nfs_server *server, | |||
658 | (server)->nfs_client->cl_call_sync((server), (msg), &(args)->seq_args, \ | 670 | (server)->nfs_client->cl_call_sync((server), (msg), &(args)->seq_args, \ |
659 | &(res)->seq_res, (cache_reply)) | 671 | &(res)->seq_res, (cache_reply)) |
660 | 672 | ||
661 | static void nfs4_sequence_done(const struct nfs_server *server, | ||
662 | struct nfs4_sequence_res *res, int rpc_status) | ||
663 | { | ||
664 | #ifdef CONFIG_NFS_V4_1 | ||
665 | if (nfs4_has_session(server->nfs_client)) | ||
666 | nfs41_sequence_done(res); | ||
667 | #endif /* CONFIG_NFS_V4_1 */ | ||
668 | } | ||
669 | |||
670 | static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) | 673 | static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) |
671 | { | 674 | { |
672 | struct nfs_inode *nfsi = NFS_I(dir); | 675 | struct nfs_inode *nfsi = NFS_I(dir); |