Whamcloud - gitweb
Branch b_release_1_6_7
authorfanyong <fanyong>
Tue, 12 May 2009 06:19:57 +0000 (06:19 +0000)
committerfanyong <fanyong>
Tue, 12 May 2009 06:19:57 +0000 (06:19 +0000)
b=17336
i=robert.read
i=jinshan.xiong

Do not trigger readpage when objective page index exceeds the end-of-file page index.

lustre/llite/file.c

index 08c72e5..79872b1 100644 (file)
@@ -1542,12 +1542,10 @@ repeat:
 
                         if ((size == 0 && cur_index != 0) ||
                             (((size - 1) >> CFS_PAGE_SHIFT) < cur_index)) {
-                                if (lock_style != LL_LOCK_STYLE_NOLOCK) {
+                                if (lock_style != LL_LOCK_STYLE_NOLOCK)
                                         ll_file_put_lock(inode, end, lock_style,
                                                          cookie, &tree,
                                                          OBD_BRW_READ);
-                                        up_read(&lli->lli_truncate_rwsem);
-                                }
                                 goto out;
                         }
                 }