Skip to content

Commit

Permalink
ncpfs: return proper error from NCP_IOC_SETROOT ioctl
Browse files Browse the repository at this point in the history
commit a682e9c upstream.

If some error happens in NCP_IOC_SETROOT ioctl, the appropriate error
return value is then (in most cases) just overwritten before we return.
This can result in reporting success to userspace although error happened.

This bug was introduced by commit 2e54eb9 ("BKL: Remove BKL from
ncpfs").  Propagate the errors correctly.

Coverity id: 1226925.

Fixes: 2e54eb9 ("BKL: Remove BKL from ncpfs")
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jan Kara authored and Greg Kroah-Hartman committed Jan 8, 2015
1 parent fa06c84 commit 522a816
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/ncpfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg
result = -EIO;
}
}
result = 0;
}
mutex_unlock(&server->root_setup_lock);

Expand Down

0 comments on commit 522a816

Please sign in to comment.