Messages in this thread Patch in this message |  | | Date | Sun, 15 Sep 2002 10:41:34 +0100 (BST) | From | Hugh Dickins <> | Subject | [PATCH] tmpfs 4/5 three trivia |
| |
tmpfs contributes to the AltSysRqM swapcache add and delete statistics, but not to its find statistics: use lookup_swap_cache wrapper to find_get_page, to contribute to those statistics too. Elsewhere, use existing info pointer and NAME_MAX definition.
--- tmpfs3/mm/shmem.c Sat Sep 14 18:21:23 2002 +++ tmpfs4/mm/shmem.c Sat Sep 14 18:21:23 2002 @@ -560,7 +560,7 @@ unsigned long flags; /* Look it up and read it in.. */ - page = find_get_page(&swapper_space, entry->val); + page = lookup_swap_cache(*entry); if (!page) { swp_entry_t swap = *entry; spin_unlock (&info->lock); @@ -734,7 +734,7 @@ inode->i_op = &shmem_inode_operations; inode->i_fop = &shmem_file_operations; spin_lock (&shmem_ilock); - list_add_tail(&SHMEM_I(inode)->list, &shmem_inodes); + list_add_tail(&info->list, &shmem_inodes); spin_unlock (&shmem_ilock); break; case S_IFDIR: @@ -1004,7 +1004,7 @@ buf->f_files = sbinfo->max_inodes; buf->f_ffree = sbinfo->free_inodes; spin_unlock (&sbinfo->stat_lock); - buf->f_namelen = 255; + buf->f_namelen = NAME_MAX; return 0; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |