Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.13-pre3 /mm/shmem.c

Filename:/mm/shmem.c
Lines Added:1
Lines Deleted:3
Also changed in: (Previous) 2.4.12-ac2  2.4.12-ac1  2.4.12  2.4.11  2.4.11-pre6  2.4.11-pre5 
(Following) 2.4.13-pre4  2.4.13-pre5  2.4.13-pre6  2.4.13  2.4.13-ac1  2.4.13-ac2 

Location
[  2.4.13-pre3
  [  mm
     o  shmem.c

Patch

diff -u --recursive --new-file v2.4.12/linux/mm/shmem.c linux/mm/shmem.c
--- v2.4.12/linux/mm/shmem.c   Thu Oct 11 08:02:26 2001
+++ linux/mm/shmem.c   Mon Oct 15 12:09:50 2001
@@ -386,10 +386,10 @@
    spin_unlock (&info->lock);
    return 0;
 found:
+   delete_from_swap_cache(page);
    add_to_page_cache(page, info->inode->i_mapping, offset + idx);
    SetPageDirty(page);
    SetPageUptodate(page);
-   UnlockPage(page);
    info->swapped--;
    spin_unlock(&info->lock);
    return 1;
@@ -531,10 +531,8 @@
       if (!page) {
          swp_entry_t swap = *entry;
          spin_unlock (&info->lock);
-         lock_kernel();
          swapin_readahead(*entry);
          page = read_swap_cache_async(*entry);
-         unlock_kernel();
          if (!page) {
             if (entry->val != swap.val)
                goto repeat;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.