From 843945aed2a4b99a4fd1492b68b18ee80c5c994c Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Tue, 28 Feb 2017 14:27:51 +0530 Subject: storage/posix: Use more granular mutex locks for atomic writes Change-Id: I7a5167de77fabf19c5151775b553913a1af5a765 BUG: 1421938 Signed-off-by: Krutika Dhananjay Reviewed-on: https://review.gluster.org/16785 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Raghavendra Bhat Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/storage/posix/src/posix-helpers.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/storage/posix/src/posix-helpers.c') 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; } -- cgit