Commit e0baec1b authored by Jiri Slaby's avatar Jiri Slaby Committed by Frederic Weisbecker

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: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Reiserfs <reiserfs-devel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent 6c287054
...@@ -104,9 +104,10 @@ setflags_out: ...@@ -104,9 +104,10 @@ setflags_out:
err = put_user(inode->i_generation, (int __user *)arg); err = put_user(inode->i_generation, (int __user *)arg);
break; break;
case REISERFS_IOC_SETVERSION: case REISERFS_IOC_SETVERSION:
if (!is_owner_or_cap(inode)) if (!is_owner_or_cap(inode)) {
err = -EPERM; err = -EPERM;
break; break;
}
err = mnt_want_write(filp->f_path.mnt); err = mnt_want_write(filp->f_path.mnt);
if (err) if (err)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment