From: Shan Hai Date: Mon, 24 Jul 2017 05:43:35 +0000 (+0800) Subject: ovl: convert inode_lock to mutex_lock X-Git-Tag: v4.1.12-108.0.20170806_1300~34 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2c621ad7e299957f5e9d967caab485d6d9885e43;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 0413d72f79fbc..71b35bd725081 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; }