int i = 0;
ENTRY;
+ /* if there are no pages, remove from super block list */
if (list_empty(obdfs_iplist(inode))) {
list_del(obdfs_islist(inode));
+ /* we check for "empty" on this animal: must init it! */
+ INIT_LIST_HEAD(obdfs_islist(inode));
CDEBUG(D_INODE, "empty list\n");
EXIT;
return 0;
}
-/* Remove writeback requests from an inode */
+/* Remove writeback requests for the superblock */
int obdfs_flush_reqs(struct list_head *inode_list, int flush_inode,
int check_time)
{
err = OPS(sb, brw)(WRITE, &sbi->osi_conn, num_obdos, obdos, oa_bufs,
bufs, counts, offsets, flags);
- do {
- put_page(pages[--num_io]);
- } while ( num_io > 0 );
+ /* release the pages from the page cache */
+ while ( num_io >= 0 ) {
+ num_io--;
+ put_page(pages[num_io]);
+ }
EXIT;
return err;