]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ovl: convert inode_lock to mutex_lock
authorShan Hai <shan.hai@oracle.com>
Mon, 24 Jul 2017 05:43:35 +0000 (13:43 +0800)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:50:04 +0000 (13:50 +0800)
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 <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/dir.c

index 0413d72f79fbcf8b2b4685c3fb8aa017397848fe..71b35bd725081500ef7dca357ccbc282b95e83bc 100644 (file)
@@ -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;
        }