diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-02-28 14:27:51 +0530 | 
|---|---|---|
| committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-03-06 11:19:18 -0500 | 
| commit | 44a8e1d4947a9f701bfd7d83558263d6ec314764 (patch) | |
| tree | eba993703a093228ba6760bc5fa3c213eca8803f /xlators/storage/posix/src/posix-helpers.c | |
| parent | e46cb08e9d381c46277631fa266751cd63f3823c (diff) | |
storage/posix: Use more granular mutex locks for atomic writes
        Backport of: https://review.gluster.org/16785
Change-Id: If80b1543c4fe16cb81e2ae92ccca695f3bf450d7
BUG: 1427387
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/16841
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@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;          }  | 
