Re: linux-next: Tree for April 1 [BROKEN ubifs when CONFIG_DEBUG_SECTION_MISMATCH=y]s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 2, 2011 at 12:14 PM, Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> wrote:
> On Sat, Apr 2, 2011 at 2:20 AM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>> cc'ing Jens ...
>>
>> On Fri, 1 Apr 2011 20:22:41 +0200 Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> wrote:
>>>
>>> On Fri, Apr 1, 2011 at 7:02 PM, Artem Bityutskiy <dedekind1@xxxxxxxxx> wrote:
>>> > On Fri, 2011-04-01 at 18:10 +0200, Sedat Dilek wrote:
>>> >> On Fri, Apr 1, 2011 at 6:06 PM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>>> >> > Cc'ing Artem,
>>> >> >
>>> >> > On Fri, 1 Apr 2011 17:55:52 +0200 Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> wrote:
>>> >> >>
>>> >> >> With CONFIG_DEBUG_SECTION_MISMATCH=y set, I see in my build.log:
>>> >> >> ...
>>> >> >> MODPOST 2742 modules
>>> >> >> ...
>>> >> >> ERROR: "empty_aops" [fs/ubifs/ubifs.ko] undefined!
>>> >> >> make[5]: *** [__modpost] Error 1
>>> >> >> make[4]: *** [modules] Error 2
>>> >> >> make[3]: *** [sub-make] Error 2
>>> >> >> make[2]: *** [all] Error 2
>>> >> >> make[2]: Leaving directory
>>> >> >> `/home/sd/src/linux-2.6/linux-2.6.39-rc1/debian/build/build_i386_none_686-iniza'
>>> >> >>
[...]
> Just FYI:
> I contacted Jens last night and he refreshed his for-linus GIT branch.
> Adding missing include <linux/fs.h> did not fix the issue.
> I am trying with the attached one.
>
> - Sedat -
>

I have split the single patch into two, first reflects ther build-error.
The second considers {inode,file}_operations have also undefined
functions by using "unified" empty_{iops,fops} as used in other fs/*
files.

- Sedat -
From 6571267a32bebe6d87e12d160658624ee56039fc Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@xxxxxxxxx>
Date: Sat, 2 Apr 2011 12:28:37 +0200
Subject: [PATCH 1/2] nilfs2,ubifs: Fix error empty_aops undefined

With the ->sync_page() hook gone, we have a few users that
add their own static address_space_operations without any
functions defined.

This fixes the following issues:
ERROR: "empty_aops" [fs/ubifs/ubifs.ko] undefined!
ERROR: "empty_aops" [fs/nilfs2/nilfs2.ko] undefined!

Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
---
 fs/nilfs2/page.c |    2 +-
 fs/ubifs/xattr.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
index 9d2dc6b..e7df3f9 100644
--- a/fs/nilfs2/page.c
+++ b/fs/nilfs2/page.c
@@ -495,7 +495,7 @@ unsigned nilfs_page_count_clean_buffers(struct page *page,
 void nilfs_mapping_init(struct address_space *mapping,
 			struct backing_dev_info *bdi)
 {
-	static const struct address_space_operations empty_aops;
+	static const struct address_space_operations empty_aops = {};
 
 	mapping->host = NULL;
 	mapping->flags = 0;
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index c74400f..29d5681 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -80,7 +80,6 @@ enum {
 };
 
 static const struct inode_operations none_inode_operations;
-static const struct address_space_operations none_address_operations;
 static const struct file_operations none_file_operations;
 
 /**
@@ -100,6 +99,7 @@ static const struct file_operations none_file_operations;
 static int create_xattr(struct ubifs_info *c, struct inode *host,
 			const struct qstr *nm, const void *value, int size)
 {
+	static const struct address_space_operations empty_aops = {};
 	int err;
 	struct inode *inode;
 	struct ubifs_inode *ui, *host_ui = ubifs_inode(host);
@@ -130,7 +130,7 @@ static int create_xattr(struct ubifs_info *c, struct inode *host,
 	}
 
 	/* Re-define all operations to be "nothing" */
-	inode->i_mapping->a_ops = &none_address_operations;
+	inode->i_mapping->a_ops = &empty_aops;
 	inode->i_op = &none_inode_operations;
 	inode->i_fop = &none_file_operations;
 
-- 
1.7.4.2

From 0f45039cfdd50d494d7fdba9d595aed2918167cc Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@xxxxxxxxx>
Date: Sat, 2 Apr 2011 12:33:44 +0200
Subject: [PATCH 2/2] ubifs: Move {inode,file}_operations to create_xattr() and use empty_{iops,fops}

Consider inode_operations and file_operations have also no functions defined
and move them to create_xattr().
Transform to empty_{iops,fops} (see fs/inode.c and fs/open.c).

Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
---
 fs/ubifs/xattr.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 29d5681..d237c4f 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -79,9 +79,6 @@ enum {
 	SECURITY_XATTR,
 };
 
-static const struct inode_operations none_inode_operations;
-static const struct file_operations none_file_operations;
-
 /**
  * create_xattr - create an extended attribute.
  * @c: UBIFS file-system description object
@@ -100,6 +97,8 @@ static int create_xattr(struct ubifs_info *c, struct inode *host,
 			const struct qstr *nm, const void *value, int size)
 {
 	static const struct address_space_operations empty_aops = {};
+	static const struct inode_operations empty_iops = {};
+	static const struct file_operations empty_fops = {};
 	int err;
 	struct inode *inode;
 	struct ubifs_inode *ui, *host_ui = ubifs_inode(host);
@@ -131,8 +130,8 @@ static int create_xattr(struct ubifs_info *c, struct inode *host,
 
 	/* Re-define all operations to be "nothing" */
 	inode->i_mapping->a_ops = &empty_aops;
-	inode->i_op = &none_inode_operations;
-	inode->i_fop = &none_file_operations;
+	inode->i_op = &empty_iops;
+	inode->i_fop = &empty_fops;
 
 	inode->i_flags |= S_SYNC | S_NOATIME | S_NOCMTIME | S_NOQUOTA;
 	ui = ubifs_inode(inode);
-- 
1.7.4.2


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux