Skip to contentSkip to conversation

linux-next: build failure after merge of the akpm-current tree

PATCH Stephen Rothwell 3 participants 6 messages Jan 12, 2017 – Jan 13, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc allyesconfig) failed like this:

In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/file.c: In function 'ocfs2_permission':
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available

 inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                             ^
fs/ocfs2/file.c:1345:16: error: called from here
  has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                ^
In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available
 inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                             ^
fs/ocfs2/file.c:1345:16: error: called from here
  has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                ^
In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/dlmglue.h:185:13: error: inlining failed in call to always_inline 'ocfs2_add_holder': function body not available
 inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
             ^

fs/ocfs2/file.c:1353:3: error: called from here
ocfs2_add_holder(lockres, &oh);
^
In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/dlmglue.h:187:13: error: inlining failed in call to always_inline 'ocfs2_remove_holder': function body not available
inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,

             ^

fs/ocfs2/file.c:1359:3: error: called from here
ocfs2_remove_holder(lockres, &oh);
^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/acl.c: In function 'ocfs2_iop_set_acl':
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available

 inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                             ^
fs/ocfs2/acl.c:292:16: error: called from here
  has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                ^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available
 inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                             ^
fs/ocfs2/acl.c:292:16: error: called from here
  has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                ^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/dlmglue.h:185:13: error: inlining failed in call to always_inline 'ocfs2_add_holder': function body not available
 inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
             ^

fs/ocfs2/acl.c:302:3: error: called from here
ocfs2_add_holder(lockres, &oh);
^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/dlmglue.h:187:13: error: inlining failed in call to always_inline 'ocfs2_remove_holder': function body not available
inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,

             ^

fs/ocfs2/acl.c:307:3: error: called from here
ocfs2_remove_holder(lockres, &oh);
^

Caused by commits

984c4659d463 ("ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock") 0ca17730270e ("ocfs2: fix deadlocks when taking inode lock at vfs entry points")

I applied this fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Jan 2017 14:40:03 +1100
Subject: [PATCH] ocfs2/dmglue: do not inline functions whose bodies are not in
scope

---
 fs/ocfs2/dlmglue.c | 6 +++---
 fs/ocfs2/dlmglue.h | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
fs/ocfs2/dlmglue.c +3 -3
index 951f5d9a0884..f0823f4d0afd 100644
@@ -750,7 +750,7 @@ void ocfs2_lock_res_free(struct ocfs2_lock_res *res)
 	res->l_flags = 0UL;
 }
 
-inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
 				   struct ocfs2_holder *oh)
 {
 	INIT_LIST_HEAD(&oh->oh_list);
@@ -761,7 +761,7 @@ inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
 	spin_unlock(&lockres->l_lock);
 }
 
-inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
 				       struct ocfs2_holder *oh)
 {
 	spin_lock(&lockres->l_lock);
@@ -771,7 +771,7 @@ inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
 	put_pid(oh->oh_owner_pid);
 }
 
-inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres)
+struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres)
 {
 	struct ocfs2_holder *oh;
 	struct pid *pid;
fs/ocfs2/dlmglue.h +3 -3
index d65ff1e49552..7f0c07bb30a3 100644
@@ -182,10 +182,10 @@ void ocfs2_set_locking_protocol(void);
  * Keep a list of processes who have interest in a lockres.
  * Note: this is now only uesed for check recursive cluster lock.
  */
-inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
 			     struct ocfs2_holder *oh);
-inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
 			     struct ocfs2_holder *oh);
-inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
+struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
 
 #endif	/* DLMGLUE_H */
Signature · 5 lines
2.10.2

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen,

Thanks for your report and the fix for it. The 0-day project has reported several days ago, but this patch set is still in discussion, so I am waiting for more days to see if other developers have any other questions.

I am confused that how to deal with your patch if I need to work out the V2 patch set. Perhaps, pick up your fix and add your efforts in the change log?

Thanks,
Eric

Quoted 131 lines · Stephen Rothwell

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc allyesconfig) failed like this:

In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/file.c: In function 'ocfs2_permission':
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available

  inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                              ^
fs/ocfs2/file.c:1345:16: error: called from here
   has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                 ^
In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available
  inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                              ^
fs/ocfs2/file.c:1345:16: error: called from here
   has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                 ^
In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/dlmglue.h:185:13: error: inlining failed in call to always_inline 'ocfs2_add_holder': function body not available
  inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
              ^
fs/ocfs2/file.c:1353:3: error: called from here
    ocfs2_add_holder(lockres, &oh);
    ^
In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/dlmglue.h:187:13: error: inlining failed in call to always_inline 'ocfs2_remove_holder': function body not available
  inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
              ^
fs/ocfs2/file.c:1359:3: error: called from here
    ocfs2_remove_holder(lockres, &oh);
    ^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/acl.c: In function 'ocfs2_iop_set_acl':
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available
  inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                              ^
fs/ocfs2/acl.c:292:16: error: called from here
   has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                 ^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available
  inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                              ^
fs/ocfs2/acl.c:292:16: error: called from here
   has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                 ^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/dlmglue.h:185:13: error: inlining failed in call to always_inline 'ocfs2_add_holder': function body not available
  inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
              ^
fs/ocfs2/acl.c:302:3: error: called from here
    ocfs2_add_holder(lockres, &oh);
    ^
In file included from fs/ocfs2/acl.c:31:0:
fs/ocfs2/dlmglue.h:187:13: error: inlining failed in call to always_inline 'ocfs2_remove_holder': function body not available
  inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
              ^
fs/ocfs2/acl.c:307:3: error: called from here
    ocfs2_remove_holder(lockres, &oh);
    ^

Caused by commits

984c4659d463 ("ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock") 0ca17730270e ("ocfs2: fix deadlocks when taking inode lock at vfs entry points")

I applied this fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 Jan 2017 14:40:03 +1100
Subject: [PATCH] ocfs2/dmglue: do not inline functions whose bodies are not in
scope

---
  fs/ocfs2/dlmglue.c | 6 +++---
  fs/ocfs2/dlmglue.h | 6 +++---
  2 files changed, 6 insertions(+), 6 deletions(-)
fs/ocfs2/dlmglue.c +3 -3
index 951f5d9a0884..f0823f4d0afd 100644
@@ -750,7 +750,7 @@ void ocfs2_lock_res_free(struct ocfs2_lock_res *res)
  	res->l_flags = 0UL;
  }
 
-inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
  				   struct ocfs2_holder *oh)
  {
  	INIT_LIST_HEAD(&oh->oh_list);
@@ -761,7 +761,7 @@ inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
  	spin_unlock(&lockres->l_lock);
  }
 
-inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
  				       struct ocfs2_holder *oh)
  {
  	spin_lock(&lockres->l_lock);
@@ -771,7 +771,7 @@ inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
  	put_pid(oh->oh_owner_pid);
  }
 
-inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres)
+struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres)
  {
  	struct ocfs2_holder *oh;
  	struct pid *pid;
fs/ocfs2/dlmglue.h +3 -3
index d65ff1e49552..7f0c07bb30a3 100644
@@ -182,10 +182,10 @@ void ocfs2_set_locking_protocol(void);
   * Keep a list of processes who have interest in a lockres.
   * Note: this is now only uesed for check recursive cluster lock.
   */
-inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
  			     struct ocfs2_holder *oh);
-inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
+void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
  			     struct ocfs2_holder *oh);
-inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
+struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
 
  #endif	/* DLMGLUE_H */
#2 lore raw
Quoted 14 lines · On Thu, 12 Jan 2017 13:06:01 +0800 Eric Ren <[email protected]> wrote:
Quoted 5 lines · Stephen Rothwell

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc allyesconfig) failed like this:

Quoted 8 lines

In file included from fs/ocfs2/file.c:49:0:
fs/ocfs2/file.c: In function 'ocfs2_permission':
fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available

  inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres);
                              ^
fs/ocfs2/file.c:1345:16: error: called from here
   has_locked = (ocfs2_is_locked_by_me(lockres) != NULL);
                 ^
Quoted 7 lines

...

Quoted 6 lines

Caused by commits

984c4659d463 ("ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock") 0ca17730270e ("ocfs2: fix deadlocks when taking inode lock at vfs entry points")

(top-posting repaired. Please don't do that)

Quoted 10 lines

Hi Stephen,

Thanks for your report and the fix for it. The 0-day project has reported several days ago, but this patch set is still in discussion, so I am waiting for more days to see if other developers
have any other questions.

I am confused that how to deal with your patch if I need to work out the V2 patch set. Perhaps, pick up your fix and add your efforts in the change log?

I'll drop

ocfs2-dlmglue-prepare-tracking-logic-to-avoid-recursive-cluster-lock.patch and ocfs2-fix-deadlocks-when-taking-inode-lock-at-vfs-entry-points.patch

#3 lore raw

Hi Andrew,

Quoted 6 lines · On Thu, 12 Jan 2017 15:33:53 -0800 Andrew Morton <[email protected]>…

I'll drop

ocfs2-dlmglue-prepare-tracking-logic-to-avoid-recursive-cluster-lock.patch and ocfs2-fix-deadlocks-when-taking-inode-lock-at-vfs-entry-points.patch

I removed them from linux-next today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#4 lore raw
In reply to Eric Ren

Hi Eric,

Quoted 8 lines · On Thu, 12 Jan 2017 13:06:01 +0800 Eric Ren <[email protected]> wrote:

Thanks for your report and the fix for it. The 0-day project has reported several days ago, but this patch set is still in discussion, so I am waiting for more days to see if other developers
have any other questions.

I am confused that how to deal with your patch if I need to work out the V2 patch set. Perhaps, pick up your fix and add your efforts in the change log?

If you had already fixed the problem, then just submit your new version. You only need to give credit when you use someone's work.

If you want to give credit, then maybe a line like:

[[email protected] remove some inlines]

among the Signed-off-by: lines

Signature · 2 lines
Cheers,
Stephen Rothwell
#5 lore raw

Hi,

Quoted 10 lines · Stephen Rothwell

Hi Eric,

Quoted 7 lines · On Thu, 12 Jan 2017 13:06:01 +0800 Eric Ren <[email protected]> wrote:

Thanks for your report and the fix for it. The 0-day project has reported several days ago, but this patch set is still in discussion, so I am waiting for more days to see if other developers
have any other questions.

I am confused that how to deal with your patch if I need to work out the V2 patch set. Perhaps, pick up your fix and add your efforts in the change log?

Quoted 8 lines

If you had already fixed the problem, then just submit your new version. You only need to give credit when you use someone's work.

If you want to give credit, then maybe a line like:

[[email protected] remove some inlines]

among the Signed-off-by: lines

Sure! I always keep it in mind;-)

Thanks,
Eric