From 6c700940a71f2b9135af0cd773f8694bacec0e6f Mon Sep 17 00:00:00 2001 From: braam Date: Sat, 22 Jan 2000 05:02:06 +0000 Subject: [PATCH] Onee error in a loop fixed. --- lustre/include/linux/obdfs.h | 4 +++- lustre/obdfs/rw.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lustre/include/linux/obdfs.h b/lustre/include/linux/obdfs.h index cbdf71b..655d690 100644 --- a/lustre/include/linux/obdfs.h +++ b/lustre/include/linux/obdfs.h @@ -59,8 +59,9 @@ struct obdfs_pgrq { struct page *rq_page; /* page to be written */ }; +#if 0 void obdfs_print_list(struct list_head *page_list) { - struct list_head *tmp; + struct list_head *tmp = page_list; while ( (tmp = tmp->next) != page_list) { struct obdfs_pgrq *pgrq; @@ -69,6 +70,7 @@ void obdfs_print_list(struct list_head *page_list) { } } +#endif inline void obdfs_pgrq_del(struct obdfs_pgrq *pgrq); int obdfs_do_vec_wr(struct super_block *sb, obd_count num_io, obd_count num_oa, struct obdo **obdos, obd_count *oa_bufs, diff --git a/lustre/obdfs/rw.c b/lustre/obdfs/rw.c index 06e7d5a..59a7b73 100644 --- a/lustre/obdfs/rw.c +++ b/lustre/obdfs/rw.c @@ -186,7 +186,7 @@ int obdfs_do_vec_wr(struct super_block *sb, obd_count num_io, bufs, counts, offsets, flags); /* release the pages from the page cache */ - while ( num_io >= 0 ) { + while ( num_io > 0 ) { num_io--; put_page(pages[num_io]); } -- 1.8.3.1