summaryrefslogtreecommitdiff
path: root/fs/reiserfs/ioctl.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-01-06 23:09:50 +0100
committerFrederic Weisbecker <fweisbec@gmail.com>2010-01-07 14:03:18 +0100
commite0baec1b63632f25ea8101b76edaca0accc061ec (patch)
treed4395fde34e5c1d714c14e17ffe38f280ebadb0f /fs/reiserfs/ioctl.c
parent6c28705418de012216161b14a2ff1dda3da3d786 (diff)
reiserfs: Fix unreachable statement
Stanse found an unreachable statement in reiserfs_ioctl. There is a if followed by error assignment and `break' with no braces. Add the braces so that we don't break every time, but only in error case, so that REISERFS_IOC_SETVERSION actually works when it returns no error. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Reiserfs <reiserfs-devel@vger.kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'fs/reiserfs/ioctl.c')
-rw-r--r--fs/reiserfs/ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index ace77451ceb1..f53505de0712 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;