fs: export mnt_{get,put}_write_access() to modules

Overlayfs is going to use those to get write access on the upper mount
during entire copy up without taking freeze protection on upper sb for
the entire copy up.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Message-Id: <20230908132900.2983519-3-amir73il@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Amir Goldstein 2023-09-08 16:29:00 +03:00 committed by Christian Brauner
parent 3e15dcf77b
commit ddf9e2ff67
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
1 changed files with 2 additions and 0 deletions

View File

@ -386,6 +386,7 @@ int mnt_get_write_access(struct vfsmount *m)
return ret;
}
EXPORT_SYMBOL_GPL(mnt_get_write_access);
/**
* mnt_want_write - get write access to a mount
@ -466,6 +467,7 @@ void mnt_put_write_access(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
EXPORT_SYMBOL_GPL(mnt_put_write_access);
/**
* mnt_drop_write - give up write access to a mount