[XFS] fix PBF_NONE handling

SGI-PV: 908809
SGI-Modid: xfs-linux:xfs-kern:198669a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 489b7f6..188cbbd 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -458,7 +458,8 @@
 			unlock_page(bp->pb_pages[i]);
 	}
 
-	bp->pb_flags &= ~PBF_NONE;
+	if (page_count)
+		bp->pb_flags &= ~PBF_NONE;
 
 	PB_TRACE(bp, "lookup_pages", (long)page_count);
 	return error;