浏览代码

cifs: remove unneeded condition check

file->private_data can never be null after calling initiate_cifs_search.
So private null check condition is not needed.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Steve French <steve.french@primarydata.com>
Namjae Jeon 10 年之前
父节点
当前提交
15d9870633
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      fs/cifs/readdir.c

+ 0 - 4
fs/cifs/readdir.c

@@ -794,10 +794,6 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)
 		if it before then restart search
 		if it before then restart search
 		if after then keep searching till find it */
 		if after then keep searching till find it */
 
 
-	if (file->private_data == NULL) {
-		rc = -EINVAL;
-		goto rddir2_exit;
-	}
 	cifsFile = file->private_data;
 	cifsFile = file->private_data;
 	if (cifsFile->srch_inf.endOfSearch) {
 	if (cifsFile->srch_inf.endOfSearch) {
 		if (cifsFile->srch_inf.emptyDir) {
 		if (cifsFile->srch_inf.emptyDir) {