summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/server/src/server-resolve.c')
-rw-r--r--xlators/protocol/server/src/server-resolve.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index 4e6ec6a..d3e604f 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -458,7 +458,10 @@ resolve_anonfd_simple (call_frame_t *frame)
ret = 0;
- state->fd = fd_anonymous_with_flags (inode, state->flags);
+ if (frame->root->op == GF_FOP_READ || frame->root->op == GF_FOP_WRITE)
+ state->fd = fd_anonymous_with_flags (inode, state->flags);
+ else
+ state->fd = fd_anonymous (inode);
out:
if (inode)
inode_unref (inode);