Skip to content

Commit

Permalink
reiserfs: Fix unreachable statement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and fweisbec committed Jan 7, 2010
1 parent 6c28705 commit e0baec1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/reiserfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
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;
Expand Down

0 comments on commit e0baec1

Please sign in to comment.