Whamcloud - gitweb
Branch b1_8
authorvitaly <vitaly>
Mon, 29 Jun 2009 17:10:00 +0000 (17:10 +0000)
committervitaly <vitaly>
Mon, 29 Jun 2009 17:10:00 +0000 (17:10 +0000)
b=19207
i=zam
i=panda

memleak fix for zero ll_get_user_pages case

lustre/llite/rw26.c

index 2be2987..c07768f 100644 (file)
@@ -133,7 +133,7 @@ static inline int ll_get_user_pages(int rw, unsigned long user_addr,
                                         *max_pages, (rw == READ), 0, *pages,
                                         NULL);
                 up_read(&current->mm->mmap_sem);
-                if (unlikely(result < 0))
+                if (unlikely(result <= 0))
                         OBD_FREE(*pages, *max_pages * sizeof(**pages));
         }