[PATCH] fs/overlayfs: fix comments mentioning i_mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: hongnanli <hongnan.li@xxxxxxxxxxxxxxxxx>

inode->i_mutex has been replaced with inode->i_rwsem long ago. Fix
comments still mentioning i_mutex.

Signed-off-by: hongnanli <hongnan.li@xxxxxxxxxxxxxxxxx>
---
 fs/overlayfs/copy_up.c | 4 ++--
 fs/overlayfs/dir.c     | 4 ++--
 fs/overlayfs/inode.c   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index b193d08a3dc3..8f7d7f05e5fb 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -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.
  */
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index f18490813170..c96dfbf5c9e0 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -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)
 {
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 1f36158c7dbe..25c6d2c9a9bd 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -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].
-- 
2.19.1.6.gb485710b




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux