소스 검색

ncpfs: return proper error from NCP_IOC_SETROOT ioctl

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 2e54eb96e2c8 ("BKL: Remove BKL from
ncpfs").  Propagate the errors correctly.

Coverity id: 1226925.

Fixes: 2e54eb96e2c80 ("BKL: Remove BKL from ncpfs")
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Petr Vandrovec <petr@vandrovec.name>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara 10 년 전
부모
커밋
a682e9c28c
1개의 변경된 파일0개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      fs/ncpfs/ioctl.c

+ 0 - 1
fs/ncpfs/ioctl.c

@@ -447,7 +447,6 @@ static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg
 						result = -EIO;
 						result = -EIO;
 					}
 					}
 				}
 				}
-				result = 0;
 			}
 			}
 			mutex_unlock(&server->root_setup_lock);
 			mutex_unlock(&server->root_setup_lock);