lkml.org 
[lkml]   [2013]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-next: manual merge of the akpm-current tree with the vfs tree
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;


\
 
 \ /
  Last update: 2013-11-08 15:01    [W:0.102 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site