Commit 83c69b86 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] tmpfs: minor fixes

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.  (I'll be sending 2.4
version to Marcelo shortly.)
parent a76da73c
......@@ -597,7 +597,7 @@ static struct page * shmem_getpage_locked(struct shmem_inode_info *info, struct
shmem_recalc_inode(inode);
if (entry->val) {
/* 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);
......@@ -800,7 +800,7 @@ struct inode *shmem_get_inode(struct super_block *sb, int mode, int dev)
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:
......@@ -1086,7 +1086,7 @@ static int shmem_statfs(struct super_block *sb, struct statfs *buf)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment