cifs: move rename and delete-on-close logic into helper function
authorJeff Layton <jlayton@redhat.com>
Tue, 23 Sep 2008 15:48:35 +0000 (11:48 -0400)
committerSteve French <sfrench@us.ibm.com>
Tue, 23 Sep 2008 17:11:03 +0000 (17:11 +0000)
commita12a1ac7a474b3680b9cce9f64a4f78123aecf37
treeea56c96d7c0b0a81a8629779359ec06eaf922c3d
parent2846d3864738dd6e290755d0692cf377e09ba79f
cifs: move rename and delete-on-close logic into helper function

cifs: move rename and delete-on-close logic into helper function

When a file is still open on the server, we attempt to set the
DELETE_ON_CLOSE bit and rename it to a new filename. When the
last opener closes the file, the server should delete it.

This patch moves this mechanism into a helper function and has
the two places in cifs_unlink that do this procedure call it. It
also fixes the open flags to be correct.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c