X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Ftiny-shmem.c;h=5f2cbf0f153c7a35db2219cab124c0ac8513ce4c;hb=4e229beff7ee43d3d5e387ec91188b20f6267c00;hp=cdc6d431972b74c8aacd9e07ec32f95e73d5d55e;hpb=ccf18968b1bbc2fb117190a1984ac2a826dac228;p=linux-2.6 diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index cdc6d43197..5f2cbf0f15 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -33,9 +32,6 @@ static int __init init_tmpfs(void) { BUG_ON(register_filesystem(&tmpfs_fs_type) != 0); -#ifdef CONFIG_TMPFS - devfs_mk_dir("shm"); -#endif shm_mnt = kern_mount(&tmpfs_fs_type); BUG_ON(IS_ERR(shm_mnt)); @@ -90,7 +86,7 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) file->f_mode = FMODE_WRITE | FMODE_READ; /* notify everyone as to the change of file size */ - error = do_truncate(dentry, size, file); + error = do_truncate(dentry, size, 0, file); if (error < 0) goto close_file;