All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: linux-erofs@lists.ozlabs.org, nl6720 <nl6720@gmail.com>
Subject: [PATCH] erofs-utils: fix multiple definition of `sbi'
Date: Tue,  8 Dec 2020 18:57:41 +0800	[thread overview]
Message-ID: <20201208105741.9614-1-hsiangkao@aol.com> (raw)
In-Reply-To: 20201208105741.9614-1-hsiangkao.ref@aol.com

As nl6720 reported [1], lib/inode.o (mkfs) and lib/super.o (erofsfuse)
could be compiled together by some options. Fix it now.

[1] https://lore.kernel.org/r/10789285.Na0ui7I3VY@walnut
Reported-by: nl6720 <nl6720@gmail.com>
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
---
Hi nl6720,
could you verify this patch? Thanks in advance!

Thanks,
Gao Xiang

 lib/config.c | 1 +
 lib/inode.c  | 2 --
 lib/super.c  | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/config.c b/lib/config.c
index 315511284871..3ecd48140cfd 100644
--- a/lib/config.c
+++ b/lib/config.c
@@ -11,6 +11,7 @@
 #include "erofs/internal.h"
 
 struct erofs_configure cfg;
+struct erofs_sb_info sbi;
 
 void erofs_init_configure(void)
 {
diff --git a/lib/inode.c b/lib/inode.c
index 3d634fc92852..0c4839dc7152 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -22,8 +22,6 @@
 #include "erofs/xattr.h"
 #include "erofs/exclude.h"
 
-struct erofs_sb_info sbi;
-
 #define S_SHIFT                 12
 static unsigned char erofs_ftype_by_mode[S_IFMT >> S_SHIFT] = {
 	[S_IFREG >> S_SHIFT]  = EROFS_FT_REG_FILE,
diff --git a/lib/super.c b/lib/super.c
index 2d366928e12b..025cefee3aac 100644
--- a/lib/super.c
+++ b/lib/super.c
@@ -11,8 +11,6 @@
 #include "erofs/io.h"
 #include "erofs/print.h"
 
-struct erofs_sb_info sbi;
-
 static bool check_layout_compatibility(struct erofs_sb_info *sbi,
 				       struct erofs_super_block *dsb)
 {
-- 
2.24.0


       reply	other threads:[~2020-12-08 10:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201208105741.9614-1-hsiangkao.ref@aol.com>
2020-12-08 10:57 ` Gao Xiang via Linux-erofs [this message]
2020-12-08 16:16   ` [PATCH] erofs-utils: fix multiple definition of `sbi' nl6720
2020-12-08 23:24     ` Gao Xiang
2020-12-12  9:54       ` Li GuiFu via Linux-erofs

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=20201208105741.9614-1-hsiangkao@aol.com \
    --to=linux-erofs@lists.ozlabs.org \
    --cc=hsiangkao@aol.com \
    --cc=nl6720@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.