diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-06-08 11:23:26 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2014-07-08 01:11:50 -0700 |
commit | 98c1d1488cc5fe3b61c3118850d36195baa644a4 (patch) | |
tree | d389978c61b032dcfdcb3a101de693c0e5f269c5 /xlators/features/gfid-access/src/gfid-access.h | |
parent | 671145d09616b3cb2bd62810a916841a35b96e75 (diff) |
features/gfid-access: Fix inode leaks and loc path corruption
Backport of http://review.gluster.org/8009
Backport of http://review.gluster.org/8163
BUG: 1112659
Change-Id: Ic70a3ddfcfef88909c12ca6791a8e20c3fee2eae
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8250
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/gfid-access/src/gfid-access.h')
-rw-r--r-- | xlators/features/gfid-access/src/gfid-access.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.h b/xlators/features/gfid-access/src/gfid-access.h index 31c82e07891..5c7a95af4c8 100644 --- a/xlators/features/gfid-access/src/gfid-access.h +++ b/xlators/features/gfid-access/src/gfid-access.h @@ -31,38 +31,6 @@ #define GF_GFID_DIR ".gfid" #define GF_AUX_GFID 0xd -#define GFID_ACCESS_GET_VALID_DIR_INODE(x,l,unref,lbl) do { \ - int ret = 0; \ - uint64_t value = 0; \ - inode_t *tmp_inode = NULL; \ - \ - /* if its an entry operation, on the virtual */ \ - /* directory inode as parent, we need to handle */ \ - /* it properly */ \ - if (l->parent) { \ - ret = inode_ctx_get (l->parent, x, &value); \ - if (ret) \ - goto lbl; \ - tmp_inode = (inode_t *)value; \ - l->parent = inode_ref (tmp_inode); \ - /* if parent is virtual, no need to handle */ \ - /* loc->inode */ \ - break; \ - } \ - \ - /* if its an inode operation, on the virtual */ \ - /* directory inode itself, we need to handle */ \ - /* it properly */ \ - if (l->inode) { \ - ret = inode_ctx_get (l->inode, x, &value); \ - if (ret) \ - goto lbl; \ - tmp_inode = (inode_t *)value; \ - l->inode = inode_ref (tmp_inode); \ - } \ - \ - } while (0) - #define GFID_ACCESS_ENTRY_OP_CHECK(loc,err,lbl) do { \ /* need to check if the lookup is on virtual dir */ \ if ((loc->name && !strcmp (GF_GFID_DIR, loc->name)) && \ |