lkml.org 
[lkml]   [2010]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] FS: reiserfs, fix unreachable statement
Date
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


\
 
 \ /
  Last update: 2010-01-06 23:13    [W:0.057 / U:33.152 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site