Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948145AbbGaVxV (ORCPT ); Fri, 31 Jul 2015 17:53:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45800 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752869AbbGaTmc (ORCPT ); Fri, 31 Jul 2015 15:42:32 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Theodore Tso Subject: [PATCH 4.1 033/267] ext4: set lazytime on remount if MS_LAZYTIME is set by mount Date: Fri, 31 Jul 2015 12:38:04 -0700 Message-Id: <20150731194002.974105255@linuxfoundation.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <20150731194001.933895871@linuxfoundation.org> References: <20150731194001.933895871@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1295 Lines: 40 4.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Theodore Ts'o commit a2fd66d069d86d793e9d39d4079b96f46d13f237 upstream. Newer versions of mount parse the lazytime feature and pass it to the mount system call via the flags field in the mount system call, removing the lazytime string from the mount options list. So we need to check for the presence of MS_LAZYTIME and set it in sb->s_flags in order for this flag to be set on a remount. Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/ext4/super.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4944,6 +4944,9 @@ static int ext4_remount(struct super_blo set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); } + if (*flags & MS_LAZYTIME) + sb->s_flags |= MS_LAZYTIME; + if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { err = -EROFS; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/