X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fgfs2%2Flog.c;h=45ea3ec6f776e3d9e8ce387c7a861d24f3b9ab2e;hb=e9fc2aa091ab8fa46e60d4c9d06a89305c441652;hp=a591fb8fae20ab7bf22cd7e1f76bf60f4e61c99c;hpb=59a1cc6bdabf5ed148b48808ad1a418d87f5e6bf;p=linux-2.6 diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index a591fb8fae..45ea3ec6f7 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include @@ -509,7 +509,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) { - unsigned int reserved = 1; + unsigned int reserved = 0; unsigned int old; gfs2_log_lock(sdp); @@ -524,6 +524,8 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) if (sdp->sd_log_commited_revoke) reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, sizeof(uint64_t)); + if (reserved) + reserved++; old = sdp->sd_log_blks_free; sdp->sd_log_blks_free += tr->tr_reserved -