mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Morris <jmorris@intercode.com.au>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] remove superfluous inode superblock check from shmem_mmap
Date: Mon, 16 Jun 2003 02:14:37 +1000 (EST)	[thread overview]
Message-ID: <Mutt.LNX.4.44.0306160211380.8018-100000@excalibur.intercode.com.au> (raw)

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;


             reply	other threads:[~2003-06-15 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15 16:14 James Morris [this message]
2003-06-15 17:44 ` Hugh Dickins
2003-06-15 17:40  José Luis  Alarcón Sánchez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Mutt.LNX.4.44.0306160211380.8018-100000@excalibur.intercode.com.au \
    --to=jmorris@intercode.com.au \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®