aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-05 14:41:30 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-05 14:41:30 -0400
commita67cdbd4579c387c021a17c7447da8b88f2a94f4 (patch)
tree9c2a7825b7b43cd00fff8388f69c96fd6683a405 /fs/gfs2
parentcca195c5c09b81065018dee39f4013b95bf47502 (diff)
[GFS2] Style changes in logging code
As per Jan Engelhardt's comments, removed some unused code and removed some brackets which were not required. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/log.c12
-rw-r--r--fs/gfs2/lops.c2
-rw-r--r--fs/gfs2/recovery.c4
3 files changed, 4 insertions, 14 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 571389012874..382a19eea1c7 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -177,7 +177,6 @@ int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks)
177 gfs2_log_lock(sdp); 177 gfs2_log_lock(sdp);
178 } 178 }
179 sdp->sd_log_blks_free -= blks; 179 sdp->sd_log_blks_free -= blks;
180 /* printk(KERN_INFO "reserved %u blocks (%u left)\n", blks, sdp->sd_log_blks_free); */
181 gfs2_log_unlock(sdp); 180 gfs2_log_unlock(sdp);
182 mutex_unlock(&sdp->sd_log_reserve_mutex); 181 mutex_unlock(&sdp->sd_log_reserve_mutex);
183 182
@@ -198,7 +197,6 @@ void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks)
198 197
199 gfs2_log_lock(sdp); 198 gfs2_log_lock(sdp);
200 sdp->sd_log_blks_free += blks; 199 sdp->sd_log_blks_free += blks;
201 /* printk(KERN_INFO "released %u blocks (%u left)\n", blks, sdp->sd_log_blks_free); */
202 gfs2_assert_withdraw(sdp, 200 gfs2_assert_withdraw(sdp,
203 sdp->sd_log_blks_free <= sdp->sd_jdesc->jd_blocks); 201 sdp->sd_log_blks_free <= sdp->sd_jdesc->jd_blocks);
204 gfs2_log_unlock(sdp); 202 gfs2_log_unlock(sdp);
@@ -213,9 +211,8 @@ static u64 log_bmap(struct gfs2_sbd *sdp, unsigned int lbn)
213 int bdy; 211 int bdy;
214 212
215 error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, &new, &dbn, &bdy); 213 error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, &new, &dbn, &bdy);
216 if (!(!error && dbn)) { 214 if (error || !dbn)
217 printk(KERN_INFO "error=%d, dbn=%llu lbn=%u", error, (unsigned long long)dbn, lbn); 215 printk(KERN_INFO "error=%d, dbn=%llu lbn=%u", error, (unsigned long long)dbn, lbn);
218 }
219 gfs2_assert_withdraw(sdp, !error && dbn); 216 gfs2_assert_withdraw(sdp, !error && dbn);
220 217
221 return dbn; 218 return dbn;
@@ -414,13 +411,6 @@ static void log_flush_commit(struct gfs2_sbd *sdp)
414 struct list_head *head = &sdp->sd_log_flush_list; 411 struct list_head *head = &sdp->sd_log_flush_list;
415 struct gfs2_log_buf *lb; 412 struct gfs2_log_buf *lb;
416 struct buffer_head *bh; 413 struct buffer_head *bh;
417#if 0
418 unsigned int d;
419
420 d = log_distance(sdp, sdp->sd_log_flush_head, sdp->sd_log_head);
421
422 gfs2_assert_withdraw(sdp, d + 1 == sdp->sd_log_blks_reserved);
423#endif
424 414
425 while (!list_empty(head)) { 415 while (!list_empty(head)) {
426 lb = list_entry(head->next, struct gfs2_log_buf, lb_list); 416 lb = list_entry(head->next, struct gfs2_log_buf, lb_list);
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 07655a755619..f8f6d4b56a01 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -518,7 +518,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
518 unsigned int num, n; 518 unsigned int num, n;
519 __be64 *ptr = NULL; 519 __be64 *ptr = NULL;
520 520
521 offset += (2*sizeof(__be64) - 1); 521 offset += 2*sizeof(__be64) - 1;
522 offset &= ~(2*sizeof(__be64) - 1); 522 offset &= ~(2*sizeof(__be64) - 1);
523 limit = (sdp->sd_sb.sb_bsize - offset)/sizeof(__be64); 523 limit = (sdp->sd_sb.sb_bsize - offset)/sizeof(__be64);
524 524
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index ab55191926c3..a27569c5d85e 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -306,8 +306,8 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
306 u32 length; 306 u32 length;
307 __be64 *ptr; 307 __be64 *ptr;
308 unsigned int offset = sizeof(struct gfs2_log_descriptor); 308 unsigned int offset = sizeof(struct gfs2_log_descriptor);
309 offset += (sizeof(__be64)-1); 309 offset += sizeof(__be64) - 1;
310 offset &= ~(sizeof(__be64)-1); 310 offset &= ~(sizeof(__be64) - 1);
311 311
312 while (start != end) { 312 while (start != end) {
313 error = gfs2_replay_read_block(jd, start, &bh); 313 error = gfs2_replay_read_block(jd, start, &bh);