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
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 <[email protected]>
Cc: Petr Vandrovec <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jankara authored and torvalds committed Dec 11, 2014
1 parent 6ef4536 commit a682e9c
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 a682e9c

Please sign in to comment.