Re: [PATCH 2/2] fs: print a message when freezing/unfreezing filesystems

Joe Perches
2014-05-13T18:39:46Z

On Tue, 2014-05-13 at 20:31 +0200, Mateusz Guzik wrote:
> This helps hang troubleshooting efforts when only dmesg is available.
[]
> diff --git a/fs/super.c b/fs/super.c
[]
> @@ -1289,12 +1289,9 @@ int freeze_super(struct super_block *sb)
> return 0; /* sic - it's "nothing to do" */
> }
>
> - if (sb->s_flags & MS_RDONLY) {
> + if (sb->s_flags & MS_RDONLY)
> /* Nothing to do really... */
> - sb->s_writers.frozen = SB_FREEZE_COMPLETE;
> - up_write(&sb->s_umount);
> - return 0;
> - }
> + goto out;

Should this block really be part of this patch?
If so, please add a small note to the commit log.

I'm not sure making the reader goto out for this
bit of the code needs doing as there are multiple
blocks with return above here.

Trivially, when there is a comment in a single line
like this, then braces are often used too.