fs/overlayfs: fix comments mentioning i_mutex
PATCH 1/1 fs/overlayfs: fix comments mentioning i_mutex
From: hongnanli <[email protected]>
inode->i_mutex has been replaced with inode->i_rwsem long ago. Fix comments still mentioning i_mutex.
Signed-off-by hongnanli <[email protected]>
--- fs/overlayfs/copy_up.c | 4 ++-- fs/overlayfs/dir.c | 4 ++-- fs/overlayfs/inode.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
fs/overlayfs/copy_up.c +2 -2
@@ -432,7 +432,7 @@ static int ovl_set_upper_fh(struct ovl_fs *ofs, struct dentry *upper,/* * Create and install index entry. * -* Caller must hold i_mutex on indexdir. +* Caller must hold i_rwsem on indexdir. */ static int ovl_create_index (struct dentry *dentry,struct dentry *origin,struct dentry *upper)
@@ -762,7 +762,7 @@ static int ovl_copy_up_tmpfile(struct ovl_copy_up_ctx *c)* * All renames start with copy up of source if necessary. The actual * rename will only proceed once the copy up was successful. Copy up uses -* upper parent i_mutex for exclusion. Since rename can change d_parent it +* upper parent i_rwsem for exclusion. Since rename can change d_parent it * is possible that the copy up will lock the old parent. At that point * the file will have already been copied up anyway. */
fs/overlayfs/dir.c +2 -2
@@ -61,7 +61,7 @@ struct dentry *ovl_lookup_temp(struct dentry *workdir)return temp; } -/* caller holds i_mutex on workdir */ +/* caller holds i_rwsem on workdir */ static struct dentry *ovl_whiteout (struct ovl_fs *ofs) {int err;
@@ -105,7 +105,7 @@ static struct dentry *ovl_whiteout(struct ovl_fs *ofs)return whiteout; } -/* Caller must hold i_mutex on both workdir and dir */ +/* Caller must hold i_rwsem on both workdir and dir */ int ovl_cleanup_and_whiteout (struct ovl_fs *ofs,struct inode *dir,struct dentry *dentry) {
fs/overlayfs/inode.c +1 -1
@@ -670,7 +670,7 @@ static const struct address_space_operations ovl_aops = {/* * It is possible to stack overlayfs instance on top of another * overlayfs instance as lower layer. We need to annotate the -* stackable i_mutex locks according to stack level of the super +* stackable i_rwsem locks according to stack level of the super * block instance. An overlayfs instance can never be in stack * depth 0 (there is always a real fs below it). An overlayfs * inode lock will use the lockdep annotation ovl_i_mutex_key[depth].
Signature · 1 line
2.19.1.6.gb485710b
Miklos Szeredi
maintainerQuoted 5 lines · Hongnan Li
From: hongnanli <[email protected]>
inode->i_mutexhas been replaced withinode->i_rwsemlong ago. Fix comments still mentioningi_mutex.
IMO "inode lock" is more descriptive.
Thanks,
Miklos