diff options
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/fd.c | 17 | ||||
-rw-r--r-- | libglusterfs/src/fd.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c index 2f4afc5e87a..36cc4d0561f 100644 --- a/libglusterfs/src/fd.c +++ b/libglusterfs/src/fd.c @@ -780,6 +780,23 @@ fd_anonymous (inode_t *inode) return fd; } +fd_t* +fd_lookup_anonymous (inode_t *inode) +{ + fd_t *fd = NULL; + + if (!inode) { + gf_log_callingfn ("fd", GF_LOG_WARNING, "!inode"); + return NULL; + } + + LOCK (&inode->lock); + { + fd = __fd_lookup_anonymous (inode); + } + UNLOCK (&inode->lock); + return fd; +} gf_boolean_t fd_is_anonymous (fd_t *fd) diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h index 54290b1980b..c1b9157d882 100644 --- a/libglusterfs/src/fd.h +++ b/libglusterfs/src/fd.h @@ -134,6 +134,9 @@ fd_lookup (struct _inode *inode, pid_t pid); fd_t * fd_lookup_uint64 (struct _inode *inode, uint64_t pid); +fd_t* +fd_lookup_anonymous (inode_t *inode); + fd_t * fd_anonymous (inode_t *inode); |