linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] remove superfluous inode superblock check from shmem_mmap
@ 2003-06-15 17:40  José Luis  Alarcón Sánchez
  0 siblings, 0 replies; 3+ messages in thread
From:  José Luis  Alarcón Sánchez @ 2003-06-15 17:40 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

>
> ------- Mensaje Original -------
>
> DeJames Morris <jmorris@intercode.com.au>
> FechaMon, 16 Jun 2003 02:14:37 +1000 (EST)
>
>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
>
>
>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;
>

  Can i apply this patch against the 2.5.69 kernel?.

  Thanks yo very much, in advance.

  Regards.

  Jose.

http://linuxespana.scripterz.org

FreeBSD RELEASE 4.8.
Mandrake Linux 9.1 Kernels 2.4.21 & 2.5.69 XFS.
Registered Linux User #213309.
Memories..... You are talking about memories. 
Rick Deckard. Blade Runner.

_________________________________________________________
Envia tus postales desde Tarjetas Nico. Entra en http://www.tarjetasnico.com/es/index.html?partner=lycoses&nico_usr=premium



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove superfluous inode superblock check from shmem_mmap
  2003-06-15 16:14 James Morris
@ 2003-06-15 17:44 ` Hugh Dickins
  0 siblings, 0 replies; 3+ messages in thread
From: Hugh Dickins @ 2003-06-15 17:44 UTC (permalink / raw)
  To: James Morris; +Cc: Andrew Morton, Christoph Rohland, linux-kernel

On Mon, 16 Jun 2003, James Morris wrote:
> 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.

Thanks, looks good to me.  I don't believe an inode with NULL i_sb
could ever have got to shmem_mmap - it's just a check copied over
from an old generic_file_mmap.

Andrew, please apply: thank you.
Hugh

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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] remove superfluous inode superblock check from shmem_mmap
@ 2003-06-15 16:14 James Morris
  2003-06-15 17:44 ` Hugh Dickins
  0 siblings, 1 reply; 3+ messages in thread
From: James Morris @ 2003-06-15 16:14 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: linux-kernel

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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-15 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-15 17:40 [PATCH] remove superfluous inode superblock check from shmem_mmap  José Luis  Alarcón Sánchez
  -- strict thread matches above, loose matches on Subject: below --
2003-06-15 16:14 James Morris
2003-06-15 17:44 ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).