summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3-helpers.c
diff options
context:
space:
mode:
authorshishir <shishirng@gluster.com>2011-07-26 12:56:54 +0530
committerAnand Avati <avati@gluster.com>2011-07-28 02:59:32 -0700
commitcf4501899ca75a6641a31cf7116d439dfb6dd4de (patch)
treece4b00c3719d66165bdc98f6558582485c5bb464 /xlators/nfs/server/src/nfs3-helpers.c
parentfa979753d9fe27c6338a0d384d0f183ea716003d (diff)
NFS: Implement nfs_forget call
Make sure the inode_ctx is deleted nfs_release is not needed, as __nfs3_fdcache_remove_entry cleans up the ctx Change-Id: I690efa1eb1d4cd39cee258bb29692cc58ab9c380 BUG: 3250 Reviewed-on: http://review.gluster.com/103 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shehjar Tikoo <shehjart@gluster.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs3-helpers.c')
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index 523fdaee9..0b39e3d16 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -1726,7 +1726,8 @@ err:
int
-nfs3_flush_call_state (nfs3_call_state_t *cs, fd_t *openedfd)
+nfs3_flush_call_state (nfs3_call_state_t *cs, fd_t *openedfd,
+ int32_t call_resume)
{
if ((!cs))
return -1;
@@ -1745,14 +1746,16 @@ nfs3_flush_call_state (nfs3_call_state_t *cs, fd_t *openedfd)
cs->resolve_ret = 0;
}
list_del (&cs->openwait_q);
- nfs3_call_resume (cs);
+ if (call_resume)
+ nfs3_call_resume (cs);
return 0;
}
int
-nfs3_flush_inode_queue (struct inode_op_queue *inode_q, fd_t *openedfd)
+nfs3_flush_inode_queue (struct inode_op_queue *inode_q, fd_t *openedfd,
+ int32_t call_resume)
{
nfs3_call_state_t *cstmp = NULL;
nfs3_call_state_t *cs = NULL;
@@ -1761,7 +1764,7 @@ nfs3_flush_inode_queue (struct inode_op_queue *inode_q, fd_t *openedfd)
return -1;
list_for_each_entry_safe (cs, cstmp, &inode_q->opq, openwait_q)
- nfs3_flush_call_state (cs, openedfd);
+ nfs3_flush_call_state (cs, openedfd, call_resume);
return 0;
}
@@ -1790,7 +1793,7 @@ nfs3_flush_open_wait_call_states (nfs3_call_state_t *cs, fd_t *openedfd)
pthread_mutex_lock (&inode_q->qlock);
{
- nfs3_flush_inode_queue (inode_q, openedfd);
+ nfs3_flush_inode_queue (inode_q, openedfd, 1);
}
pthread_mutex_unlock (&inode_q->qlock);