From 3af274c2681fad65f2fd5c0d4495f1b683100561 Mon Sep 17 00:00:00 2001 From: Duane Griffin Date: Tue, 2 Jun 2009 08:09:19 -0400 Subject: [PATCH] ext4: tighten restrictions on inode flags (cherry picked from commit 2dc6b0d48ca0599837df21b14bb8393d0804af57) At the moment there are few restrictions on which flags may be set on which inodes. Specifically DIRSYNC may only be set on directories and IMMUTABLE and APPEND may not be set on links. Tighten that to disallow TOPDIR being set on non-directories and only NODUMP and NOATIME to be set on non-regular file, non-directories. Introduces a flags masking function which masks flags based on mode and use it during inode creation and when flags are set via the ioctl to facilitate future consistency. Signed-off-by: Duane Griffin Acked-by: Andreas Dilger Cc: Signed-off-by: Andrew Morton Signed-off-by: "Theodore Ts'o" Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed