LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: linux-next: manual merge of the akpm-current tree with the vfs tree
Date: Fri, 8 Nov 2013 14:48:59 +0100	[thread overview]
Message-ID: <20131108134859.GA4461@redhat.com> (raw)
In-Reply-To: <20131108125915.GA1000@redhat.com>

On 11/08, Oleg Nesterov wrote:
>
> On 11/08, Stephen Rothwell wrote:
> >
> > Hi Andrew,
> >
> > Today's linux-next merge of the akpm-current tree got a conflict in
> > fs/anon_inodes.c between commit 24b0303e9532 ("take anon inode allocation
> > to libfs.c") from the vfs tree and commit 02f3ac4386d9 ("anon_inodefs:
> > forbid open via /proc") from the akpm-current tree.
> >
> > I just dropped the akpm-current changes for today - they should probably
> > be applied to fs/libfs.c.
>
> Well, this probably means that
>
> 	anon_inodefs-forbid-open-via-proc.patch
>
> should be dropped. I'll rediff this patch against vfs.git

24b0303e9532 also removes anon_inode_fops. It seems that it was not really
needed anyway, inode_init_always() does inode->i_fop = empty_fops...

So probably we can simply change empty_fops but I need to recheck.

Oleg.

--- x/fs/inode.c
+++ x/fs/inode.c
@@ -114,6 +114,11 @@ int proc_nr_inodes(ctl_table *table, int
 }
 #endif
 
+static int empty_open(struct inode *inode, struct file *file)
+{
+	return -ENXIO;
+}
+
 /**
  * inode_init_always - perform inode structure intialisation
  * @sb: superblock inode belongs to
@@ -125,7 +130,9 @@ int proc_nr_inodes(ctl_table *table, int
 int inode_init_always(struct super_block *sb, struct inode *inode)
 {
 	static const struct inode_operations empty_iops;
-	static const struct file_operations empty_fops;
+	static const struct file_operations empty_fops = {
+		.open = empty_open,
+	};
 	struct address_space *const mapping = &inode->i_data;
 
 	inode->i_sb = sb;


  reply	other threads:[~2013-11-08 13:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08  7:30 Stephen Rothwell
2013-11-08 12:59 ` Oleg Nesterov
2013-11-08 13:48   ` Oleg Nesterov [this message]
2013-11-09 20:04     ` [PATCH 0/1] fs: forbid to open anon-inode files via /proc Oleg Nesterov
2013-11-09 20:04       ` [PATCH 1/1] " Oleg Nesterov
  -- strict thread matches above, loose matches on Subject: below --
2018-06-19  6:36 linux-next: manual merge of the akpm-current tree with the vfs tree Stephen Rothwell
2018-05-29  9:37 Stephen Rothwell
2017-07-10  4:41 Stephen Rothwell
2016-01-11  7:48 Stephen Rothwell
2016-01-11 13:26 ` Vlastimil Babka
2015-12-03  0:18 Mark Brown
2015-06-17  3:24 Michael Ellerman
2015-04-13 11:10 Stephen Rothwell
2015-04-13 11:00 Stephen Rothwell
2015-04-13 10:57 Stephen Rothwell
2015-03-13  5:31 Stephen Rothwell
2015-03-13  5:27 Stephen Rothwell
2013-11-08  7:38 Stephen Rothwell
2013-11-08 18:58 ` Josh Triplett
2013-11-08  7:35 Stephen Rothwell
2013-02-27  2:00 Stephen Rothwell

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=20131108134859.GA4461@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: linux-next: manual merge of the akpm-current tree with the vfs tree' \
    /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

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).