diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-02-28 14:27:51 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-03-03 04:47:55 -0500 |
commit | 843945aed2a4b99a4fd1492b68b18ee80c5c994c (patch) | |
tree | efc15f67ed772f351599866c9d4f08e114d6503a /xlators/storage/posix/src/posix-helpers.c | |
parent | 96c622d8d5129c6a20ca1cc86898327e27a9e758 (diff) |
storage/posix: Use more granular mutex locks for atomic writes
Change-Id: I7a5167de77fabf19c5151775b553913a1af5a765
BUG: 1421938
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/16785
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index af3d01b469c..f619895ba4c 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -2194,10 +2194,12 @@ __posix_inode_ctx_get (inode_t *inode, xlator_t *this) return NULL; pthread_mutex_init (&ctx_p->xattrop_lock, NULL); + pthread_mutex_init (&ctx_p->write_atomic_lock, NULL); ret = __inode_ctx_set (inode, this, (uint64_t *)&ctx_p); if (ret < 0) { pthread_mutex_destroy (&ctx_p->xattrop_lock); + pthread_mutex_destroy (&ctx_p->write_atomic_lock); GF_FREE (ctx_p); return NULL; } |