linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: sysfs: check initialization state before updating features
Date: Wed, 27 Jan 2016 13:39:30 +0100	[thread overview]
Message-ID: <20160127123930.GL8567@twin.jikos.cz> (raw)
In-Reply-To: <CAHji150m=sgHJ4SLB7YYD6DzkrSgcBfheqoDr=uwJm4LDuwtwA@mail.gmail.com>

On Wed, Jan 27, 2016 at 12:20:48PM +0100, Holger Hoffstätte wrote:
> On Wed, Jan 27, 2016 at 11:14 AM, David Sterba <dsterba@suse.com> wrote:
> > If the mount phase is not finished, we can't update the sysfs files.
> >
> > Reported-by: Chris Mason <clm@fb.com>
> > Signed-off-by: David Sterba <dsterba@suse.com>
> > ---
> >  fs/btrfs/sysfs.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> > index 6986886243bf..1ae146a8093c 100644
> > --- a/fs/btrfs/sysfs.c
> > +++ b/fs/btrfs/sysfs.c
> > @@ -804,6 +804,9 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
> >         fs_devs = fs_info->fs_devices;
> >         fsid_kobj = &fs_devs->fsid_kobj;
> >
> > +       if (!fsid_kobj.state_initialized)
> > +               return;
> > +
> 
> uhm..
> 
> fs/btrfs/sysfs.c: In function 'btrfs_sysfs_feature_update':
> fs/btrfs/sysfs.c:807:16: error: request for member 'state_initialized'
> in something not a structure or union
>   if (!fsid_kobj.state_initialized)
>                 ^
> 
> I think this should be fsid_kobj->state_initialized, no?

Of course. What I've tested was

       if (!fs_devs->fsid_kobj.state_initialized)

and removed the "fs_devs->" but did not recompile. 

  reply	other threads:[~2016-01-27 12:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 10:14 [PATCH] btrfs: sysfs: check initialization state before updating features David Sterba
2016-01-27 11:20 ` Holger Hoffstätte
2016-01-27 12:39   ` David Sterba [this message]
2016-01-27 13:06 ` [PATCH v2] " David Sterba
2016-01-27 14:26   ` Chris Mason

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=20160127123930.GL8567@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=holger.hoffstaette@googlemail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).