From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935271AbcATWIO (ORCPT ); Wed, 20 Jan 2016 17:08:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40265 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935119AbcATWBl (ORCPT ); Wed, 20 Jan 2016 17:01:41 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Junxiao Bi , Gang He , Mark Fasheh , Joel Becker , Andrew Morton , Linus Torvalds Subject: [PATCH 3.14 25/47] ocfs2: fix umask ignored issue Date: Wed, 20 Jan 2016 14:00:57 -0800 Message-Id: <20160120215511.380766236@linuxfoundation.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <20160120215507.575738941@linuxfoundation.org> References: <20160120215507.575738941@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Junxiao Bi commit 8f1eb48758aacf6c1ffce18179295adbf3bd7640 upstream. New created file's mode is not masked with umask, and this makes umask not work for ocfs2 volume. Fixes: 702e5bc ("ocfs2: use generic posix ACL infrastructure") Signed-off-by: Junxiao Bi Cc: Gang He Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/ocfs2/namei.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -345,6 +345,8 @@ static int ocfs2_mknod(struct inode *dir mlog_errno(status); goto leave; } + /* update inode->i_mode after mask with "umask". */ + inode->i_mode = mode; handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, S_ISDIR(mode),