perf diff: Use llabs() with 64-bit values
[sfrench/cifs-2.6.git] / fs / cifs / readdir.c
index e169e1a5fd358c5ac9649f1f24e7a4fb876d3635..3925a7bfc74d61c6c85f8ab6537498f064512870 100644 (file)
@@ -655,7 +655,14 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
                /* scan and find it */
                int i;
                char *cur_ent;
-               char *end_of_smb = cfile->srch_inf.ntwrk_buf_start +
+               char *end_of_smb;
+
+               if (cfile->srch_inf.ntwrk_buf_start == NULL) {
+                       cifs_dbg(VFS, "ntwrk_buf_start is NULL during readdir\n");
+                       return -EIO;
+               }
+
+               end_of_smb = cfile->srch_inf.ntwrk_buf_start +
                        server->ops->calc_smb_size(
                                        cfile->srch_inf.ntwrk_buf_start,
                                        server);