cifs: remove unneeded condition check
authorNamjae Jeon <namjae.jeon@samsung.com>
Tue, 25 Nov 2014 07:52:48 +0000 (16:52 +0900)
committerSteve French <steve.french@primarydata.com>
Mon, 8 Dec 2014 05:43:10 +0000 (23:43 -0600)
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>
fs/cifs/readdir.c

index 8fd2a95860ba9874f1bc2d008f9272d3f5825b2a..803030c9ab688fca0093df005ee4558926adcea5 100644 (file)
@@ -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) {