shmem.c (708b8eae0fd532af73ea8350e6dcc10255ff7376) shmem.c (76aac0e9a17742e60d408be1a706e9aaad370891)
1/*
2 * Resizable virtual memory filesystem for Linux.
3 *
4 * Copyright (C) 2000 Linus Torvalds.
5 * 2000 Transmeta Corp.
6 * 2000-2001 Christoph Rohland
7 * 2000-2001 SAP AG
8 * 2002 Red Hat Inc.

--- 1499 unchanged lines hidden (view full) ---

1508 struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
1509
1510 if (shmem_reserve_inode(sb))
1511 return NULL;
1512
1513 inode = new_inode(sb);
1514 if (inode) {
1515 inode->i_mode = mode;
1/*
2 * Resizable virtual memory filesystem for Linux.
3 *
4 * Copyright (C) 2000 Linus Torvalds.
5 * 2000 Transmeta Corp.
6 * 2000-2001 Christoph Rohland
7 * 2000-2001 SAP AG
8 * 2002 Red Hat Inc.

--- 1499 unchanged lines hidden (view full) ---

1508 struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
1509
1510 if (shmem_reserve_inode(sb))
1511 return NULL;
1512
1513 inode = new_inode(sb);
1514 if (inode) {
1515 inode->i_mode = mode;
1516 inode->i_uid = current->fsuid;
1517 inode->i_gid = current->fsgid;
1516 inode->i_uid = current_fsuid();
1517 inode->i_gid = current_fsgid();
1518 inode->i_blocks = 0;
1519 inode->i_mapping->backing_dev_info = &shmem_backing_dev_info;
1520 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
1521 inode->i_generation = get_seconds();
1522 info = SHMEM_I(inode);
1523 memset(info, 0, (char *)inode - (char *)info);
1524 spin_lock_init(&info->lock);
1525 INIT_LIST_HEAD(&info->swaplist);

--- 747 unchanged lines hidden (view full) ---

2273 sbinfo = kmalloc(max((int)sizeof(struct shmem_sb_info),
2274 L1_CACHE_BYTES), GFP_KERNEL);
2275 if (!sbinfo)
2276 return -ENOMEM;
2277
2278 sbinfo->max_blocks = 0;
2279 sbinfo->max_inodes = 0;
2280 sbinfo->mode = S_IRWXUGO | S_ISVTX;
1518 inode->i_blocks = 0;
1519 inode->i_mapping->backing_dev_info = &shmem_backing_dev_info;
1520 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
1521 inode->i_generation = get_seconds();
1522 info = SHMEM_I(inode);
1523 memset(info, 0, (char *)inode - (char *)info);
1524 spin_lock_init(&info->lock);
1525 INIT_LIST_HEAD(&info->swaplist);

--- 747 unchanged lines hidden (view full) ---

2273 sbinfo = kmalloc(max((int)sizeof(struct shmem_sb_info),
2274 L1_CACHE_BYTES), GFP_KERNEL);
2275 if (!sbinfo)
2276 return -ENOMEM;
2277
2278 sbinfo->max_blocks = 0;
2279 sbinfo->max_inodes = 0;
2280 sbinfo->mode = S_IRWXUGO | S_ISVTX;
2281 sbinfo->uid = current->fsuid;
2282 sbinfo->gid = current->fsgid;
2281 sbinfo->uid = current_fsuid();
2282 sbinfo->gid = current_fsgid();
2283 sbinfo->mpol = NULL;
2284 sb->s_fs_info = sbinfo;
2285
2286#ifdef CONFIG_TMPFS
2287 /*
2288 * Per default we only allow half of the physical ram per
2289 * tmpfs instance, limiting inodes to one per page of lowmem;
2290 * but the internal instance is left unlimited.

--- 318 unchanged lines hidden ---
2283 sbinfo->mpol = NULL;
2284 sb->s_fs_info = sbinfo;
2285
2286#ifdef CONFIG_TMPFS
2287 /*
2288 * Per default we only allow half of the physical ram per
2289 * tmpfs instance, limiting inodes to one per page of lowmem;
2290 * but the internal instance is left unlimited.

--- 318 unchanged lines hidden ---