From d3a318973c9613cfef8b1a14256fb5178e417fb0 Mon Sep 17 00:00:00 2001 From: Basavanagowda Kanur Date: Thu, 26 Feb 2009 20:36:50 +0530 Subject: fd->lock added to protect transactions for accessing and modifying fd->_ctx. fd->_ctx access and modifications are now protected by fd->lock. Signed-off-by: Anand V. Avati --- libglusterfs/src/fd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libglusterfs/src/fd.h') diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h index 8b8effdc335..29a79eb76ac 100644 --- a/libglusterfs/src/fd.h +++ b/libglusterfs/src/fd.h @@ -29,6 +29,7 @@ #include #include #include "glusterfs.h" +#include "locking.h" struct _inode; struct _dict; @@ -44,6 +45,8 @@ struct _fd { struct list_head inode_list; struct _inode *inode; struct _dict *ctx; + gf_lock_t lock; /* used ONLY for manipulating + 'struct _fd_ctx' array (_ctx).*/ struct _fd_ctx *_ctx; }; typedef struct _fd fd_t; -- cgit