Whamcloud - gitweb
r=adilger
authorgreen <green>
Fri, 8 Apr 2005 07:23:09 +0000 (07:23 +0000)
committergreen <green>
Fri, 8 Apr 2005 07:23:09 +0000 (07:23 +0000)
Small optimisation. Do not drop partially truncated page from cache on client,
so that when later somebody decides to write there, we won't need to fetch it
from OST again (synchronously).

lustre/llite/rw26.c

index 07b0d45..f9699ed 100644 (file)
@@ -61,6 +61,8 @@ static int ll_writepage_26(struct page *page, struct writeback_control *wbc)
    locked page too */
 static int ll_invalidatepage(struct page *page, unsigned long offset)
 {
+        if (offset)
+                return 0;
         if (PagePrivate(page))
                 ll_removepage(page);
         return 1;