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

From: Joe Perches
Date: Tue May 13 2014 - 14:39:47 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/