patch-2.1.37 linux/fs/ext2/ioctl.c

Next file: linux/fs/ext2/namei.c
Previous file: linux/fs/ext2/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/fs/ext2/ioctl.c linux/fs/ext2/ioctl.c
@@ -45,6 +45,10 @@
 		if (IS_RDONLY(inode))
 			return -EROFS;
 		inode->u.ext2_i.i_flags = flags;
+		if (flags & EXT2_SYNC_FL)
+			inode->i_flags |= MS_SYNCHRONOUS;
+		else
+			inode->i_flags &= ~MS_SYNCHRONOUS;
 		if (flags & EXT2_APPEND_FL)
 			inode->i_flags |= S_APPEND;
 		else
@@ -53,6 +57,10 @@
 			inode->i_flags |= S_IMMUTABLE;
 		else
 			inode->i_flags &= ~S_IMMUTABLE;
+		if (flags & EXT2_NOATIME_FL)
+			inode->i_flags |= MS_NOATIME;
+		else
+			inode->i_flags &= ~MS_NOATIME;
 		inode->i_ctime = CURRENT_TIME;
 		inode->i_dirt = 1;
 		return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov