Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8a7f3cd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  kill I_LOCK
  fold do_sync_file_range into sys_sync_file_range
  fix up O_SYNC comments
  VFS/fsstack: handle 32-bit smp + preempt + large files in fsstack_copy_inode_size
  fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all
  vfs: remove extraneous NULL d_inode check from do_filp_open
  fs: no games with DCACHE_UNHASHED
  fs: anon_inodes implement dname
  dio: fix use-after-free
parents a377d181 eaff8079
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#define O_NOATIME	04000000
#define O_CLOEXEC	010000000 /* set close_on_exec */
/*
 * Before Linux 2.6.32 only O_DSYNC semantics were implemented, but using
 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
 * the O_SYNC flag.  We continue to use the existing numerical value
 * for O_DSYNC semantics now, but using the correct symbolic name for it.
 * This new value is used to request true Posix O_SYNC semantics.  It is
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
#define FASYNC		0x1000	/* fcntl, for BSD compatibility */
#define O_LARGEFILE	0x2000	/* allow large file opens */
/*
 * Before Linux 2.6.32 only O_DSYNC semantics were implemented, but using
 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
 * the O_SYNC flag.  We continue to use the existing numerical value
 * for O_DSYNC semantics now, but using the correct symbolic name for it.
 * This new value is used to request true Posix O_SYNC semantics.  It is
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
#define O_NOATIME	0x200000
#define O_CLOEXEC	0x400000
/*
 * Before Linux 2.6.32 only O_DSYNC semantics were implemented, but using
 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
 * the O_SYNC flag.  We continue to use the existing numerical value
 * for O_DSYNC semantics now, but using the correct symbolic name for it.
 * This new value is used to request true Posix O_SYNC semantics.  It is
+7 −10
Original line number Diff line number Diff line
@@ -35,14 +35,13 @@ static int anon_inodefs_get_sb(struct file_system_type *fs_type, int flags,
			     mnt);
}

static int anon_inodefs_delete_dentry(struct dentry *dentry)
{
/*
	 * We faked vfs to believe the dentry was hashed when we created it.
	 * Now we restore the flag so that dput() will work correctly.
 * anon_inodefs_dname() is called from d_path().
 */
	dentry->d_flags |= DCACHE_UNHASHED;
	return 1;
static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
{
	return dynamic_dname(dentry, buffer, buflen, "anon_inode:%s",
				dentry->d_name.name);
}

static struct file_system_type anon_inode_fs_type = {
@@ -51,7 +50,7 @@ static struct file_system_type anon_inode_fs_type = {
	.kill_sb	= kill_anon_super,
};
static const struct dentry_operations anon_inodefs_dentry_operations = {
	.d_delete	= anon_inodefs_delete_dentry,
	.d_dname	= anon_inodefs_dname,
};

/*
@@ -119,8 +118,6 @@ struct file *anon_inode_getfile(const char *name,
	atomic_inc(&anon_inode_inode->i_count);

	path.dentry->d_op = &anon_inodefs_dentry_operations;
	/* Do not publish this dentry inside the global dentry hash table */
	path.dentry->d_flags &= ~DCACHE_UNHASHED;
	d_instantiate(path.dentry, anon_inode_inode);

	error = -ENFILE;
+1 −1
Original line number Diff line number Diff line
@@ -1206,7 +1206,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
	 * NOTE: filesystems with their own locking have to handle this
	 * on their own.
	 */
	if (dio->flags & DIO_LOCKING) {
	if (flags & DIO_LOCKING) {
		if (unlikely((rw & WRITE) && retval < 0)) {
			loff_t isize = i_size_read(inode);
			if (end > isize)
Loading