Merge branches 'release', 'bugzilla-12011', 'bugzilla-12632', 'misc' and 'suspend...
[linux-2.6-block.git] / mm / shmem.c
index 5d0de96c97897f463eaa0d469f86ad5f273664d5..19d566ccdeeab8c6a1f0431602b3bd3dd5a76026 100644 (file)
@@ -2628,7 +2628,7 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags)
                goto close_file;
 
 #ifdef CONFIG_SHMEM
-       SHMEM_I(inode)->flags = flags & VM_ACCOUNT;
+       SHMEM_I(inode)->flags = (flags & VM_NORESERVE) ? 0 : VM_ACCOUNT;
 #endif
        d_instantiate(dentry, inode);
        inode->i_size = size;