fence-agents: master - [doc] Improve wiki export
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=842aab...
Commit: 842aabd3b2d27da36ac1bb2c210163f83613d591
Parent: b7b26b816be8d79a8ff6e32b1d023a8b5354ab28
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Sep 24 14:57:20 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Sep 24 14:57:20 2014 +0200
[doc] Improve wiki export
---
fence/agents/lib/fence2wiki.xsl | 2 +-
fence/agents/xenapi/fence_xenapi.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fence2wiki.xsl b/fence/agents/lib/fence2wiki.xsl
index b94cbc1..8112169 100644
--- a/fence/agents/lib/fence2wiki.xsl
+++ b/fence/agents/lib/fence2wiki.xsl
@@ -2,10 +2,10 @@
<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/resource-agent">
+[=#<xsl:value-of select="@name" />]
||='''<xsl:value-of select="@shortdesc" />''' =||='''<xsl:value-of select="@name" />''' =||
|| '''Name Of The Argument For STDIN''' || '''Name Of The Argument For Command-Line''' || '''Default Value''' ||'''Description''' ||
<xsl:apply-templates select="parameters/parameter" />
-<xsl:text>-</xsl:text>
</xsl:template>
<xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || {{{<xsl:value-of select="content/@default" disable-output-escaping="yes"/>}}} || <xsl:value-of select="shortdesc" /> ||
diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py
index f32c4ea..655831e 100644
--- a/fence/agents/xenapi/fence_xenapi.py
+++ b/fence/agents/xenapi/fence_xenapi.py
@@ -206,7 +206,7 @@ def main():
options = check_input(device_opt, process_input(device_opt))
docs = {}
- docs["shortdesc"] = "Fence agent fo Citrix XenServer over XenAPI"
+ docs["shortdesc"] = "Fence agent for Citrix XenServer over XenAPI"
docs["longdesc"] = "\
fence_cxs is an I/O Fencing agent used on Citrix XenServer hosts. \
It uses the XenAPI, supplied by Citrix, to establish an XML-RPC sesssion \
9 years, 6 months
fence-agents: master - [doc] Improve wiki export
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=b7b26b...
Commit: b7b26b816be8d79a8ff6e32b1d023a8b5354ab28
Parent: f07ee2abe99ef84ed4bf18b2df111d4c2bb1f43c
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Sep 22 16:38:52 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Sep 22 16:38:52 2014 +0200
[doc] Improve wiki export
---
fence/agents/lib/fence2wiki.xsl | 10 +++++-----
fence/agents/ovh/fence_ovh.py | 2 +-
fence/agents/xenapi/fence_xenapi.py | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fence/agents/lib/fence2wiki.xsl b/fence/agents/lib/fence2wiki.xsl
index 93853a0..b94cbc1 100644
--- a/fence/agents/lib/fence2wiki.xsl
+++ b/fence/agents/lib/fence2wiki.xsl
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/resource-agent">
-||- <xsl:value-of select="@shortdesc" /> (<xsl:value-of select="@name" />) =||
-|| stdin argument || command-line argument || description ||
+||='''<xsl:value-of select="@shortdesc" />''' =||='''<xsl:value-of select="@name" />''' =||
+|| '''Name Of The Argument For STDIN''' || '''Name Of The Argument For Command-Line''' || '''Default Value''' ||'''Description''' ||
<xsl:apply-templates select="parameters/parameter" />
--
+<xsl:text>-</xsl:text>
</xsl:template>
-<xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || <xsl:value-of select="shortdesc" />||
+<xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || {{{<xsl:value-of select="content/@default" disable-output-escaping="yes"/>}}} || <xsl:value-of select="shortdesc" /> ||
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py
index 14a0706..170df11 100644
--- a/fence/agents/ovh/fence_ovh.py
+++ b/fence/agents/ovh/fence_ovh.py
@@ -29,7 +29,7 @@ def define_new_opts():
all_opt["email"] = {
"getopt" : "Z:",
"longopt" : "email",
- "help" : "-Z, --email=<email> email for reboot message: admin(a)domain.com",
+ "help" : "-Z, --email=[email] email for reboot message: admin(a)domain.com",
"required" : "1",
"shortdesc" : "Reboot email",
"default" : "",
diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py
index 6f759d7..f32c4ea 100644
--- a/fence/agents/xenapi/fence_xenapi.py
+++ b/fence/agents/xenapi/fence_xenapi.py
@@ -206,7 +206,7 @@ def main():
options = check_input(device_opt, process_input(device_opt))
docs = {}
- docs["shortdesc"] = "XenAPI based fencing for the Citrix XenServer virtual machines."
+ docs["shortdesc"] = "Fence agent fo Citrix XenServer over XenAPI"
docs["longdesc"] = "\
fence_cxs is an I/O Fencing agent used on Citrix XenServer hosts. \
It uses the XenAPI, supplied by Citrix, to establish an XML-RPC sesssion \
9 years, 6 months
fence-agents: master - fence_apc: --shell-timeout was used instead of --power-timeout
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=f07ee2...
Commit: f07ee2abe99ef84ed4bf18b2df111d4c2bb1f43c
Parent: 316ecfbad27231ced5c383d16a4f06a1679c90da
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Sep 22 14:46:43 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Sep 22 14:46:43 2014 +0200
fence_apc: --shell-timeout was used instead of --power-timeout
---
fence/agents/apc/fence_apc.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index 83bfe07..f2080f1 100644
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -170,9 +170,9 @@ def set_power_status(conn, options):
conn.send_eol(action)
conn.log_expect(options, "Enter 'YES' to continue or <ENTER> to cancel :", int(options["--shell-timeout"]))
conn.send_eol("YES")
- conn.log_expect(options, "Press <ENTER> to continue...", int(options["--shell-timeout"]))
+ conn.log_expect(options, "Press <ENTER> to continue...", int(options["--power-timeout"]))
conn.send_eol("")
- conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
+ conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
conn.send(chr(03))
conn.log_expect(options, "- Logout", int(options["--shell-timeout"]))
conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
9 years, 6 months
gfs2-utils: master - libgfs2: Remove superfluous NULL check from gfs2_rgrp_free
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=d3743efa...
Commit: d3743efabda1118a54beb84e43655809f64a103d
Parent: 45047cbf2cdfa57f309e2235334ed4cb038efb99
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Sep 19 21:24:48 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Fri Sep 19 21:24:48 2014 +0100
libgfs2: Remove superfluous NULL check from gfs2_rgrp_free
Coverity was complaining that this NULL check indicated that previous
dereferences were bad. Remove the NULL check and let free(3) deal with
NULL conditions (of which there are none in this case).
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/rgrp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c
index 1abcc82..ed8e01d 100644
--- a/gfs2/libgfs2/rgrp.c
+++ b/gfs2/libgfs2/rgrp.c
@@ -254,8 +254,7 @@ void gfs2_rgrp_free(struct osi_root *rgrp_tree)
}
gfs2_rgrp_relse(rgd); /* free them all. */
}
- if(rgd->bits)
- free(rgd->bits);
+ free(rgd->bits);
osi_erase(&rgd->node, rgrp_tree);
free(rgd);
}
9 years, 6 months
gfs2-utils: master - libgfs2: Clean up broken rgrp length check
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=45047cbf...
Commit: 45047cbf2cdfa57f309e2235334ed4cb038efb99
Parent: f67b54c097b5fbb6ace1c3589139c35e3d46adf1
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Sep 19 11:20:05 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Fri Sep 19 11:20:05 2014 +0100
libgfs2: Clean up broken rgrp length check
This length check had broken logic (!length && length > ...) and always
used the theoretical maximum rgrp size instead of a real maximum for the
fs. Replace the check with a check for a zero length.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/rgrp.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c
index 0d0f000..1abcc82 100644
--- a/gfs2/libgfs2/rgrp.c
+++ b/gfs2/libgfs2/rgrp.c
@@ -154,15 +154,9 @@ void lgfs2_rgrp_bitbuf_free(lgfs2_rgrp_t rg)
uint64_t gfs2_rgrp_read(struct gfs2_sbd *sdp, struct rgrp_tree *rgd)
{
unsigned x, length = rgd->ri.ri_length;
- uint64_t max_rgrp_bitbytes, max_rgrp_len;
struct gfs2_buffer_head **bhs;
- /* Max size of an rgrp is 2GB. Figure out how many blocks that is: */
- max_rgrp_bitbytes = ((2147483648 / sdp->bsize) / GFS2_NBBY);
- max_rgrp_len = max_rgrp_bitbytes / sdp->bsize;
- if (!length && length > max_rgrp_len)
- return -1;
- if (gfs2_check_range(sdp, rgd->ri.ri_addr))
+ if (length == 0 || gfs2_check_range(sdp, rgd->ri.ri_addr))
return -1;
bhs = calloc(length, sizeof(struct gfs2_buffer_head *));
9 years, 6 months
gfs2-utils: master - gfs2_edit: Fix use-after-free in find_wrap_pt
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=f67b54c0...
Commit: f67b54c097b5fbb6ace1c3589139c35e3d46adf1
Parent: 2b4fcf7ac3589fa8cef3b9985fdca3562b0fbb07
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Sep 18 17:43:47 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Sep 18 17:54:59 2014 +0100
gfs2_edit: Fix use-after-free in find_wrap_pt
Spotted by coverity: Calling "brelse(struct gfs2_buffer_head *)"
dereferences freed pointer.
Refactor the find_wrap_pt function to make it easier to manage memory
and minimise scope.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/journal.c | 70 ++++++++++++++++++++++++++++----------------------
1 files changed, 39 insertions(+), 31 deletions(-)
diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c
index 58f4798..81d7a90 100644
--- a/gfs2/edit/journal.c
+++ b/gfs2/edit/journal.c
@@ -297,50 +297,58 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line,
return bcount;
}
+static int is_wrap_pt(char *buf, uint64_t *highest_seq)
+{
+ struct gfs2_buffer_head tbh = { .b_data = buf };
+
+ if (get_block_type(&tbh, NULL) == GFS2_METATYPE_LH) {
+ uint64_t seq;
+
+ if (sbd.gfs1) {
+ struct gfs_log_header lh;
+ gfs_log_header_in(&lh, &tbh);
+ seq = lh.lh_sequence;
+ } else {
+ struct gfs2_log_header lh;
+ gfs2_log_header_in(&lh, &tbh);
+ seq = lh.lh_sequence;
+ }
+ if (seq < *highest_seq)
+ return 1;
+ *highest_seq = seq;
+ }
+ return 0;
+}
+
/**
* find_wrap_pt - figure out where a journal wraps
* Returns: The wrap point, in bytes
*/
-static uint64_t find_wrap_pt(struct gfs2_inode *j_inode, char *jbuf,
- uint64_t jblock, uint64_t j_size)
+static uint64_t find_wrap_pt(struct gfs2_inode *ji, char *jbuf, uint64_t jblock, uint64_t j_size)
{
- struct gfs2_buffer_head *j_bh = NULL, dummy_bh;
- uint64_t jb, abs_block;
- int error;
+ uint64_t jb = 0;
uint64_t highest_seq = 0;
for (jb = 0; jb < j_size; jb += (sbd.gfs1 ? 1 : sbd.bsize)) {
+ int found = 0;
+
if (sbd.gfs1) {
- if (j_bh)
- brelse(j_bh);
+ struct gfs2_buffer_head *j_bh;
+
j_bh = bread(&sbd, jblock + jb);
- abs_block = jblock + jb;
- dummy_bh.b_data = j_bh->b_data;
+ found = is_wrap_pt(j_bh->b_data, &highest_seq);
+ brelse(j_bh);
} else {
- error = fsck_readi(j_inode, (void *)jbuf, jb,
- sbd.bsize, &abs_block);
- if (!error) /* end of file */
- break;
- dummy_bh.b_data = jbuf;
- }
- if (get_block_type(&dummy_bh, NULL) == GFS2_METATYPE_LH) {
- struct gfs2_log_header lh;
- struct gfs_log_header lh1;
+ int copied;
+ uint64_t abs_block;
- if (sbd.gfs1) {
- gfs_log_header_in(&lh1, &dummy_bh);
- if (lh1.lh_sequence < highest_seq)
- return jb;
- highest_seq = lh1.lh_sequence;
- } else {
- gfs2_log_header_in(&lh, &dummy_bh);
- if (lh.lh_sequence < highest_seq)
- return jb;
- highest_seq = lh.lh_sequence;
- }
+ copied = fsck_readi(ji, jbuf, jb, sbd.bsize, &abs_block);
+ if (!copied) /* end of file */
+ break;
+ found = is_wrap_pt(jbuf, &highest_seq);
}
- if (j_bh)
- brelse(j_bh);
+ if (found)
+ return jb;
}
return 0;
}
9 years, 6 months
gfs2-utils: master - gfs2_edit: Set umask before calling mkstemp in savemetaopen()
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=2b4fcf7a...
Commit: 2b4fcf7ac3589fa8cef3b9985fdca3562b0fbb07
Parent: 5ad00f239c7ccfa89e279a4996a29a12783bef6e
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Sep 18 14:51:41 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Sep 18 14:51:41 2014 +0100
gfs2_edit: Set umask before calling mkstemp in savemetaopen()
Spotted by coverity: Calling "mkstemp(char *)" without securely setting
umask first.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/savemeta.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 360b144..5147ee5 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -259,6 +259,7 @@ static struct metafd savemetaopen(char *out_fn, int gziplevel)
struct metafd mfd = {-1, NULL, NULL, gziplevel};
char gzmode[3] = "w9";
char dft_fn[] = DFT_SAVE_FILE;
+ mode_t mask = umask(S_IXUSR | S_IRWXG | S_IRWXO);
if (!out_fn) {
out_fn = dft_fn;
@@ -266,6 +267,7 @@ static struct metafd savemetaopen(char *out_fn, int gziplevel)
} else {
mfd.fd = open(out_fn, O_RDWR | O_CREAT, 0644);
}
+ umask(mask);
mfd.filename = out_fn;
if (mfd.fd < 0) {
9 years, 6 months
gfs2-utils: master - gfs2_edit: Fix signed value used as array index in print_ld_blks
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=5ad00f23...
Commit: 5ad00f239c7ccfa89e279a4996a29a12783bef6e
Parent: 137f1730280d8ac02999eb64e0629763252386eb
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Sep 18 14:27:17 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Sep 18 14:27:17 2014 +0100
gfs2_edit: Fix signed value used as array index in print_ld_blks
Spotted by coverity: Using variable "type" as an index to array
"allocdesc[sbd.gfs1]".
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/journal.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c
index 5b824a4..58f4798 100644
--- a/gfs2/edit/journal.c
+++ b/gfs2/edit/journal.c
@@ -263,9 +263,12 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line,
j_bmap_bh = bread(&sbd, abs_block +
bcount);
rgd->bits[bmap].bi_bh = j_bmap_bh;
- type = lgfs2_get_bitmap(&sbd, tblk,
- rgd);
+ type = lgfs2_get_bitmap(&sbd, tblk, rgd);
brelse(j_bmap_bh);
+ if (type < 0) {
+ perror("Error printing log descriptor blocks");
+ exit(1);
+ }
rgd->bits[bmap].bi_bh = save_bh;
print_gfs2("bit for blk 0x%llx is %d "
"(%s)",
9 years, 6 months
gfs2-utils: master - gfs2_convert: Fix potential memory leaks in adjust_inode
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=137f1730...
Commit: 137f1730280d8ac02999eb64e0629763252386eb
Parent: fb30e395e6e8a05246f37365f141bef22b73193e
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Sep 18 14:07:32 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Sep 18 14:07:32 2014 +0100
gfs2_convert: Fix potential memory leaks in adjust_inode
Spotted by coverity: Variable "inode" going out of scope leaks the
storage it points to.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 19a9839..16ec150 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -877,7 +877,7 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh)
if (!fixdir) {
/*FIXME: Same message as fix_cdpn_symlink */
log_crit(_("Error: out of memory.\n"));
- return -1;
+ goto err_freei;
}
memset(fixdir, 0, sizeof(struct inode_block));
fixdir->di_addr = inode->i_di.di_num.no_addr;
@@ -931,18 +931,18 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh)
inode->i_di.di_generation = 0;
if (adjust_indirect_blocks(sbp, inode))
- return -1;
+ goto err_freei;
/* Check for cdpns */
if (S_ISLNK(inode->i_di.di_mode)) {
ret = fix_cdpn_symlink(sbp, bh, inode);
if (ret)
- return -1;
+ goto err_freei;
}
/* Check for extended attributes */
if (inode->i_di.di_eattr) {
ret = fix_xattr(sbp, bh, inode);
if (ret)
- return -1;
+ goto err_freei;
}
}
@@ -950,6 +950,9 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh)
inode_put(&inode); /* does gfs2_dinode_out if modified */
sbp->md.next_inum++; /* update inode count */
return 0;
+err_freei:
+ inode_put(&inode);
+ return -1;
} /* adjust_inode */
static int next_rg_meta(struct rgrp_tree *rgd, uint64_t *block, int first)
9 years, 6 months
gfs2-utils: master - fsck.gfs2: Fix memory leak in pass2
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=fb30e395...
Commit: fb30e395e6e8a05246f37365f141bef22b73193e
Parent: 99ec0b8d3d26fc24e945ac515c001baf352b39ee
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Sep 18 13:50:58 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Sep 18 13:50:58 2014 +0100
fsck.gfs2: Fix memory leak in pass2
Spotted by coverity: Variable "ip" going out of scope leaks the storage
it points to.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/pass2.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 2971b8c..1559d8e 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -1988,6 +1988,7 @@ int pass2(struct gfs2_sbd *sdp)
if (error) {
log_err(_("Error adding directory %s: %s\n"), "'.'",
strerror(errno));
+ fsck_inode_put(&ip);
return -errno;
}
if (cur_blks != ip->i_di.di_blocks) {
9 years, 6 months