summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/storage/posix/src/posix-helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index c87f4f59b82..f18f181c454 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -2863,6 +2863,9 @@ posix_check_internal_writes (xlator_t *this, fd_t *fd, int sysfd,
size_t xattrsize = 0;
data_t *val = NULL;
+ if (!xdata)
+ return 0;
+
LOCK (&fd->inode->lock);
{
val = dict_get (xdata, GF_PROTECT_FROM_EXTERNAL_WRITES);