public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@googlemail•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Jens Axboe <jaxboe@fusionio•com>,
	dedekind1@gmail•com, linux-next@vger•kernel.org,
	LKML <linux-kernel@vger•kernel.org>
Subject: Re: linux-next: Tree for April 1 [BROKEN ubifs when CONFIG_DEBUG_SECTION_MISMATCH=y]s
Date: Sat, 2 Apr 2011 13:02:09 +0200	[thread overview]
Message-ID: <BANLkTimfCtqTA5aPYGRMZ1Ndz6eU8HnyJA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTim_y-=rU8r0_LKEMjPco6TXrEpBvw@mail.gmail.com>

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

On Sat, Apr 2, 2011 at 12:14 PM, Sedat Dilek <sedat.dilek@googlemail•com> wrote:
> On Sat, Apr 2, 2011 at 2:20 AM, Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>> cc'ing Jens ...
>>
>> On Fri, 1 Apr 2011 20:22:41 +0200 Sedat Dilek <sedat.dilek@googlemail•com> wrote:
>>>
>>> On Fri, Apr 1, 2011 at 7:02 PM, Artem Bityutskiy <dedekind1@gmail•com> 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@canb•auug.org.au> wrote:
>>> >> > Cc'ing Artem,
>>> >> >
>>> >> > On Fri, 1 Apr 2011 17:55:52 +0200 Sedat Dilek <sedat.dilek@googlemail•com> 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 -

[-- Attachment #2: 0001-nilfs2-ubifs-Fix-error-empty_aops-undefined.patch --]
[-- Type: text/plain, Size: 2166 bytes --]

From 6571267a32bebe6d87e12d160658624ee56039fc Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail•com>
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@gmail•com>
---
 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


[-- Attachment #3: 0002-ubifs-Move-inode-file-_operations-to-create_xattr-an.patch --]
[-- Type: text/plain, Size: 1795 bytes --]

From 0f45039cfdd50d494d7fdba9d595aed2918167cc Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail•com>
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@gmail•com>
---
 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


  reply	other threads:[~2011-04-02 11:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01 18:22 linux-next: Tree for April 1 [BROKEN ubifs when CONFIG_DEBUG_SECTION_MISMATCH=y]s Sedat Dilek
2011-04-02  0:20 ` Stephen Rothwell
2011-04-02 10:14   ` Sedat Dilek
2011-04-02 11:02     ` Sedat Dilek [this message]
2011-04-03 22:16       ` Jens Axboe
2011-04-03 22:19         ` Sedat Dilek
2011-04-03 22:21           ` Jens Axboe
2011-04-03 22:33             ` Sedat Dilek
2011-04-03 22:36               ` Jens Axboe
2011-04-03 22:38                 ` Sedat Dilek
2011-04-03 22:47                   ` Jens Axboe
2011-04-03 23:14                     ` Sedat Dilek
2011-04-03 23:07                 ` Sedat Dilek

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=BANLkTimfCtqTA5aPYGRMZ1Ndz6eU8HnyJA@mail.gmail.com \
    --to=sedat.dilek@googlemail$(echo .)com \
    --cc=dedekind1@gmail$(echo .)com \
    --cc=jaxboe@fusionio$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sedat.dilek@gmail$(echo .)com \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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