Skip to contentSkip to conversation

cifs: remove unneeded condition check

PATCH Applied Namjae Jeon 2 participants 2 messages Nov 25, 2014 – Dec 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 fs/cifs/readdir.c | 4 ----
 1 file changed, 4 deletions(-)
fs/cifs/readdir.c +0 -4
index d116ca8..8eaf20a 100644
@@ -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
Applied
#1 lore raw

merged into cifs-2.6.git

Quoted 27 lines · Namjae Jeon

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

---
 fs/cifs/readdir.c | 4 ----
 1 file changed, 4 deletions(-)
fs/cifs/readdir.c +0 -5
index d116ca8..8eaf20a 100644
@@ -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