lkml.org 
[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] remove superfluous inode superblock check from shmem_mmap
This patch against current 2.5 bk removes a (now) unecessary check for an 
inode superblock in shmem_mmap(). In the current kernel, all inodes must
be associated with a superblock.

- James
--
James Morris
<jmorris@intercode.com.au>

diff -purN -X dontdiff bk.pending/mm/shmem.c bk.w1/mm/shmem.c
--- bk.pending/mm/shmem.c 2003-06-16 00:56:13.000000000 +1000
+++ bk.w1/mm/shmem.c 2003-06-16 02:06:55.142303751 +1000
@@ -1010,7 +1010,7 @@ static int shmem_mmap(struct file *file,
struct inode *inode = file->f_dentry->d_inode;

ops = &shmem_vm_ops;
- if (!inode->i_sb || !S_ISREG(inode->i_mode))
+ if (!S_ISREG(inode->i_mode))
return -EACCES;
update_atime(inode);
vma->vm_ops = ops;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.020 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site