From 2c621ad7e299957f5e9d967caab485d6d9885e43 Mon Sep 17 00:00:00 2001 From: Shan Hai Date: Mon, 24 Jul 2017 13:43:35 +0800 Subject: [PATCH] ovl: convert inode_lock to mutex_lock Orabug: 26401569 This patch is a fix to the conflict of the upstream commit bb0d2b8ad29 (ovl: fix sgid on directory), convert the lock type to match with the lock usage of the current kernel. Signed-off-by: Shan Hai Reviewed-by: Somasundaram Krishnasamy --- fs/overlayfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 0413d72f79fb..71b35bd72508 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -365,9 +365,9 @@ static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode, .ia_valid = ATTR_MODE, .ia_mode = stat->mode, }; - inode_lock(newdentry->d_inode); + mutex_lock(&newdentry->d_inode->i_mutex); err = notify_change(newdentry, &attr, NULL); - inode_unlock(newdentry->d_inode); + mutex_unlock(&newdentry->d_inode->i_mutex); if (err) goto out_cleanup; } -- 2.50.1