[linux-cifs-client] Patch 1of2 - Clean up readdir in file.c

Richard Hughes ee21rh at eim.surrey.ac.uk
Wed May 12 16:36:03 GMT 2004


Steve, 

 I've been doing work on file.c - specifically readdir, which needs
common code re-factored into individual functions. I've got two patches,
but the second needs more testing, and cleaning up. I also guess
separate patches will be clearer to what I'm trying to do. 

(Please can you check I'm doing the right thing: "if (rc) break;")

The new funtion is called cifs_copy_to_resume_name (feel free to rename
to something more suitable, and erase some superfluous comments)

The code that replaced is almost identical. Once it is called with
kfreeing search_resume_name (if exists) and once without. I don't think
checking this extra time would cause any harm (and I think it should be
called both times in my opinion anyway.)

+	if (cifsFile->search_resume_name) 
+		kfree(cifsFile->search_resume_name);

The patch is located at
http://hughsie.no-ip.com/write/cifs-refactor-1.diff

I've tested it for a few days and it all seems to be okay.

 Tell me what you think.

  Richard Hughes



More information about the linux-cifs-client mailing list