linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] FS: reiserfs, fix unreachable statement
@ 2010-01-06 22:09 Jiri Slaby
  2010-01-07 11:33 ` Frederic Weisbecker
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2010-01-06 22:09 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, jirislaby, reiserfs-devel

Stanse found an unreachable statement in reiserfs_ioctl. There is
if followed by assignment and `break'. with no braces. Add the
braces so that we don't break every time, but only in error case.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: reiserfs-devel@vger.kernel.org
---
 fs/reiserfs/ioctl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index ace7745..f53505d 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -104,9 +104,10 @@ setflags_out:
 		err = put_user(inode->i_generation, (int __user *)arg);
 		break;
 	case REISERFS_IOC_SETVERSION:
-		if (!is_owner_or_cap(inode))
+		if (!is_owner_or_cap(inode)) {
 			err = -EPERM;
 			break;
+		}
 		err = mnt_want_write(filp->f_path.mnt);
 		if (err)
 			break;
-- 
1.6.5.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] FS: reiserfs, fix unreachable statement
  2010-01-06 22:09 [PATCH 1/1] FS: reiserfs, fix unreachable statement Jiri Slaby
@ 2010-01-07 11:33 ` Frederic Weisbecker
  0 siblings, 0 replies; 2+ messages in thread
From: Frederic Weisbecker @ 2010-01-07 11:33 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: akpm, linux-kernel, jirislaby, reiserfs-devel

On Wed, Jan 06, 2010 at 11:09:50PM +0100, Jiri Slaby wrote:
> Stanse found an unreachable statement in reiserfs_ioctl. There is
> if followed by assignment and `break'. with no braces. Add the
> braces so that we don't break every time, but only in error case.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: reiserfs-devel@vger.kernel.org
> ---



Looks good.
I've applied it, thanks!



>  fs/reiserfs/ioctl.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
> index ace7745..f53505d 100644
> --- a/fs/reiserfs/ioctl.c
> +++ b/fs/reiserfs/ioctl.c
> @@ -104,9 +104,10 @@ setflags_out:
>  		err = put_user(inode->i_generation, (int __user *)arg);
>  		break;
>  	case REISERFS_IOC_SETVERSION:
> -		if (!is_owner_or_cap(inode))
> +		if (!is_owner_or_cap(inode)) {
>  			err = -EPERM;
>  			break;
> +		}
>  		err = mnt_want_write(filp->f_path.mnt);
>  		if (err)
>  			break;
> -- 
> 1.6.5.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-07 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06 22:09 [PATCH 1/1] FS: reiserfs, fix unreachable statement Jiri Slaby
2010-01-07 11:33 ` Frederic Weisbecker

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).