cifs: remove unneeded condition check
Subsystems (2)
PATCH 1/2 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 <[email protected]>
Signed-off-by Ashish Sangwan <[email protected]>
--- fs/cifs/readdir.c | 4 ---- 1 file changed, 4 deletions(-)
fs/cifs/readdir.c +0 -4
@@ -794,10 +794,6 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)if it before then restart search if after then keep searching till find it */ -if (file->private_data ==NULL ) { - rc = -EINVAL ; - goto rddir2_exit; - } cifsFile = file->private_data;if (cifsFile->srch_inf.endOfSearch) {if (cifsFile->srch_inf.emptyDir) {
Signature · 1 line
1.7.11-rc0
Steve French
Appliedmerged into cifs-2.6.git
Quoted 27 lines · Namjae Jeon
file->private_datacan never be null after callinginitiate_cifs_search. So private null check condition is not needed.Signed-off-by Namjae Jeon <[email protected]>Signed-off-by Ashish Sangwan <[email protected]>--- fs/cifs/readdir.c | 4 ---- 1 file changed, 4 deletions(-)fs/cifs/readdir.c +0
-5@@ -794,10 +794,6 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)if it before then restart search if after then keep searching till find it */ -if (file->private_data ==NULL ) { - rc = -EINVAL ; - goto rddir2_exit; - } cifsFile = file->private_data;if (cifsFile->srch_inf.endOfSearch) {if (cifsFile->srch_inf.emptyDir) { --1.7.11-rc0
Signature · 3 lines
Thanks, Steve