lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Apr 2008 18:18:59 -0400
From:	Erez Zadok <ezk@...sunysb.edu>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	viro@....linux.org.uk, hch@...radead.org,
	Erez Zadok <ezk@...sunysb.edu>
Subject: [PATCH 03/12] Unionfs: copy lower times in fsync/fasync only when needed

Signed-off-by: Erez Zadok <ezk@...sunysb.edu>
---
 fs/unionfs/file.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index 1fe4c30..f14b38b 100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -196,13 +196,13 @@ int unionfs_fsync(struct file *file, struct dentry *dentry, int datasync)
 		err = lower_inode->i_fop->fsync(lower_file,
 						lower_dentry,
 						datasync);
+		if (!err && bindex == bstart)
+			fsstack_copy_attr_times(inode, lower_inode);
 		mutex_unlock(&lower_inode->i_mutex);
 		if (err)
 			goto out;
 	}
 
-	unionfs_copy_attr_times(inode);
-
 out:
 	if (!err)
 		unionfs_check_file(file);
@@ -244,13 +244,13 @@ int unionfs_fasync(int fd, struct file *file, int flag)
 		lower_file = unionfs_lower_file_idx(file, bindex);
 		mutex_lock(&lower_inode->i_mutex);
 		err = lower_inode->i_fop->fasync(fd, lower_file, flag);
+		if (!err && bindex == bstart)
+			fsstack_copy_attr_times(inode, lower_inode);
 		mutex_unlock(&lower_inode->i_mutex);
 		if (err)
 			goto out;
 	}
 
-	unionfs_copy_attr_times(inode);
-
 out:
 	if (!err)
 		unionfs_check_file(file);
-- 
1.5.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ