scst: Rename the old version of scst_vfs_unlink_and_put()

See also commit c5e725f33b73 ("Move struct path into its own header"; v2.6.25).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9193 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-11-23 16:08:41 +00:00
parent e9299277fd
commit 54545b43e5
3 changed files with 7 additions and 8 deletions

View File

@@ -15077,7 +15077,7 @@ out_unlock:
/* Abstract vfs_unlink() for different kernel versions (as possible) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
void scst_vfs_unlink_and_put(struct nameidata *nd)
void scst_vfs_unlink_and_put_nd(struct nameidata *nd)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
vfs_unlink(nd->dentry->d_parent->d_inode, nd->dentry);
@@ -15089,7 +15089,8 @@ void scst_vfs_unlink_and_put(struct nameidata *nd)
path_put(&nd->path);
#endif
}
#else
#endif
void scst_vfs_unlink_and_put(struct path *path)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && \
@@ -15102,7 +15103,6 @@ void scst_vfs_unlink_and_put(struct path *path)
#endif
path_put(path);
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
void scst_path_put(struct nameidata *nd)
@@ -15221,7 +15221,7 @@ int scst_remove_file(const char *name)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
res = path_lookup(name, 0, &nd);
if (!res)
scst_vfs_unlink_and_put(&nd);
scst_vfs_unlink_and_put_nd(&nd);
else
TRACE_DBG("Unable to lookup file '%s' - error %d", name, res);
#else

View File

@@ -1024,7 +1024,7 @@ write_error_close:
rc = path_lookup(dev->pr_file_name, 0, &nd);
if (!rc)
scst_vfs_unlink_and_put(&nd);
scst_vfs_unlink_and_put_nd(&nd);
else
TRACE_PR("Unable to lookup '%s' - error %d",
dev->pr_file_name, rc);

View File

@@ -766,10 +766,9 @@ int scst_pr_init(struct scst_device *dev);
void scst_pr_cleanup(struct scst_device *dev);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
void scst_vfs_unlink_and_put(struct nameidata *nd);
#else
void scst_vfs_unlink_and_put(struct path *path);
void scst_vfs_unlink_and_put_nd(struct nameidata *nd);
#endif
void scst_vfs_unlink_and_put(struct path *path);
int scst_copy_file(const char *src, const char *dest);