mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
ovl: pass name buffer to ovl_start_creating_temp()
Now ovl_start_creating_temp() is passed a buffer in which to store the temp name. This will be useful in a future patch were ovl_create_real() will need access to that name. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260224222542.3458677-12-neilb@ownmail.net Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
deef049935
commit
85bb1420a8
@@ -66,10 +66,9 @@ void ovl_tempname(char name[OVL_TEMPNAME_SIZE])
|
||||
}
|
||||
|
||||
static struct dentry *ovl_start_creating_temp(struct ovl_fs *ofs,
|
||||
struct dentry *workdir)
|
||||
struct dentry *workdir,
|
||||
char name[OVL_TEMPNAME_SIZE])
|
||||
{
|
||||
char name[OVL_TEMPNAME_SIZE];
|
||||
|
||||
ovl_tempname(name);
|
||||
return start_creating(ovl_upper_mnt_idmap(ofs), workdir,
|
||||
&QSTR(name));
|
||||
@@ -81,11 +80,12 @@ static struct dentry *ovl_whiteout(struct ovl_fs *ofs)
|
||||
struct dentry *whiteout, *link;
|
||||
struct dentry *workdir = ofs->workdir;
|
||||
struct inode *wdir = workdir->d_inode;
|
||||
char name[OVL_TEMPNAME_SIZE];
|
||||
|
||||
guard(mutex)(&ofs->whiteout_lock);
|
||||
|
||||
if (!ofs->whiteout) {
|
||||
whiteout = ovl_start_creating_temp(ofs, workdir);
|
||||
whiteout = ovl_start_creating_temp(ofs, workdir, name);
|
||||
if (IS_ERR(whiteout))
|
||||
return whiteout;
|
||||
err = ovl_do_whiteout(ofs, wdir, whiteout);
|
||||
@@ -97,7 +97,7 @@ static struct dentry *ovl_whiteout(struct ovl_fs *ofs)
|
||||
}
|
||||
|
||||
if (!ofs->no_shared_whiteout) {
|
||||
link = ovl_start_creating_temp(ofs, workdir);
|
||||
link = ovl_start_creating_temp(ofs, workdir, name);
|
||||
if (IS_ERR(link))
|
||||
return link;
|
||||
err = ovl_do_link(ofs, ofs->whiteout, wdir, link);
|
||||
@@ -247,7 +247,9 @@ struct dentry *ovl_create_temp(struct ovl_fs *ofs, struct dentry *workdir,
|
||||
struct ovl_cattr *attr)
|
||||
{
|
||||
struct dentry *ret;
|
||||
ret = ovl_start_creating_temp(ofs, workdir);
|
||||
char name[OVL_TEMPNAME_SIZE];
|
||||
|
||||
ret = ovl_start_creating_temp(ofs, workdir, name);
|
||||
if (IS_ERR(ret))
|
||||
return ret;
|
||||
ret = ovl_create_real(ofs, workdir, ret, attr);
|
||||
|
||||
Reference in New Issue
Block a user