diff options
author | Basavanagowda Kanur <gowda@gluster.com> | 2009-02-26 20:36:50 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-02-26 20:51:50 +0530 |
commit | d3a318973c9613cfef8b1a14256fb5178e417fb0 (patch) | |
tree | 4a4c1b5275319a9c8680653118fe457a2db84929 /libglusterfs/src/fd.h | |
parent | 431617ef19244272797106f2356ef31591e9c7b9 (diff) |
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 <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs/src/fd.h')
-rw-r--r-- | libglusterfs/src/fd.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 <sys/types.h> #include <unistd.h> #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; |