[PATCH 17/39] reiserfs: use better open options for internal files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 The generic read path will mark the file's atime during the course of the
 read. For xattr backing files, this behavior is undesirable, so we open
 the xattr files and directories with O_NOATIME. We also add the O_DIRECTORY
 flag where the xattr dir is opened for readdir.

Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>

--
 fs/reiserfs/xattr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/fs/reiserfs/xattr.c	2007-05-30 15:44:34.000000000 -0400
+++ b/fs/reiserfs/xattr.c	2007-05-30 17:55:08.000000000 -0400
@@ -188,7 +188,7 @@ out:
 	dput(xadir);
 	if (err)
 		return ERR_PTR(err);
-	return dentry_open(xafile, NULL, O_RDWR);
+	return dentry_open(xafile, NULL, O_RDWR|O_NOATIME);
 }
 
 /*
@@ -691,7 +691,7 @@ int reiserfs_delete_xattrs(struct inode 
 		goto out;
 	}
 
-	fp = dentry_open(dir, NULL, O_RDWR);
+	fp = dentry_open(dir, NULL, O_RDWR|O_NOATIME|O_DIRECTORY);
 	if (IS_ERR(fp)) {
 		err = PTR_ERR(fp);
 		/* dentry_open dputs the dentry if it fails */
@@ -780,7 +780,7 @@ int reiserfs_chown_xattrs(struct inode *
 		goto out;
 	}
 
-	fp = dentry_open(dir, NULL, O_RDWR);
+	fp = dentry_open(dir, NULL, O_RDWR|O_NOATIME|O_DIRECTORY);
 	if (IS_ERR(fp)) {
 		err = PTR_ERR(fp);
 		/* dentry_open dputs the dentry if it fails */

-- 

-
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux