Skip to content

Commit 54d7ea7

Browse files
neilbrownbrauner
authored andcommitted
ovl: remove ovl_lock_rename_workdir()
This function is unused since Commit 833d2b3 ("Add start_renaming_two_dentries()") Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260224222542.3458677-15-neilb@ownmail.net Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 56c8fd7 commit 54d7ea7

2 files changed

Lines changed: 0 additions & 27 deletions

File tree

fs/overlayfs/overlayfs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,6 @@ bool ovl_is_inuse(struct dentry *dentry);
569569
bool ovl_need_index(struct dentry *dentry);
570570
int ovl_nlink_start(struct dentry *dentry);
571571
void ovl_nlink_end(struct dentry *dentry);
572-
int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *work,
573-
struct dentry *upperdir, struct dentry *upper);
574572
int ovl_check_metacopy_xattr(struct ovl_fs *ofs, const struct path *path,
575573
struct ovl_metacopy *data);
576574
int ovl_set_metacopy_xattr(struct ovl_fs *ofs, struct dentry *d,

fs/overlayfs/util.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,31 +1213,6 @@ void ovl_nlink_end(struct dentry *dentry)
12131213
ovl_inode_unlock(inode);
12141214
}
12151215

1216-
int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *work,
1217-
struct dentry *upperdir, struct dentry *upper)
1218-
{
1219-
struct dentry *trap;
1220-
1221-
/* Workdir should not be subdir of upperdir and vice versa */
1222-
trap = lock_rename(workdir, upperdir);
1223-
if (IS_ERR(trap))
1224-
goto err;
1225-
if (trap)
1226-
goto err_unlock;
1227-
if (work && (work->d_parent != workdir || d_unhashed(work)))
1228-
goto err_unlock;
1229-
if (upper && (upper->d_parent != upperdir || d_unhashed(upper)))
1230-
goto err_unlock;
1231-
1232-
return 0;
1233-
1234-
err_unlock:
1235-
unlock_rename(workdir, upperdir);
1236-
err:
1237-
pr_err("failed to lock workdir+upperdir\n");
1238-
return -EIO;
1239-
}
1240-
12411216
/*
12421217
* err < 0, 0 if no metacopy xattr, metacopy data size if xattr found.
12431218
* an empty xattr returns OVL_METACOPY_MIN_SIZE to distinguish from no xattr value.

0 commit comments

Comments
 (0)