X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Framfs%2Ffile-nommu.c;h=677139b48e000d0d98100122c851eff5572aa14a;hb=9f261e011340bcd22c1dd48b465153bd78caa8c8;hp=b1ca234068f67173816c51c49bceecfe2c66bed9;hpb=2152f8536668a957ea3214735b4761e7b22ef7d8;p=linux-2.6-omap-h63xx.git diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index b1ca234068f..677139b48e0 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -27,13 +27,13 @@ static int ramfs_nommu_setattr(struct dentry *, struct iattr *); -struct address_space_operations ramfs_aops = { +const struct address_space_operations ramfs_aops = { .readpage = simple_readpage, .prepare_write = simple_prepare_write, .commit_write = simple_commit_write }; -struct file_operations ramfs_file_operations = { +const struct file_operations ramfs_file_operations = { .mmap = ramfs_nommu_mmap, .get_unmapped_area = ramfs_nommu_get_unmapped_area, .read = generic_file_read, @@ -283,9 +283,9 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file, /*****************************************************************************/ /* - * set up a mapping + * set up a mapping for shared memory segments */ int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) { - return 0; + return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS; }