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]
Message-Id: <1252615120.8722.148.camel@heimdal.trondhjem.org>
Date:	Thu, 10 Sep 2009 16:38:40 -0400
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Christoph Hellwig <hch@....de>
Cc:	Jan Kara <jack@...e.cz>, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, akpm@...ux-foundation.org,
	drepper@...hat.com, viro@...iv.linux.org.uk, kyle@...artin.ca
Subject: Re: [PATCH 18/16] implement posix O_SYNC and O_DSYNC semantics

On Thu, 2009-09-10 at 22:25 +0200, Christoph Hellwig wrote:
> Index: linux-2.6/fs/sync.c
> ===================================================================
> --- linux-2.6.orig/fs/sync.c	2009-09-10 16:30:32.414027738 -0300
> +++ linux-2.6/fs/sync.c	2009-09-10 16:31:19.042005715 -0300
> @@ -285,10 +285,11 @@ SYSCALL_DEFINE1(fdatasync, unsigned int,
>   */
>  int generic_write_sync(struct file *file, loff_t pos, loff_t count)
>  {
> -	if (!(file->f_flags & O_SYNC) && !IS_SYNC(file->f_mapping->host))
> +	if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host))
>  		return 0;
>  	return vfs_fsync_range(file, file->f_path.dentry, pos,
> -			       pos + count - 1, 1);
> +			       pos + count - 1,
> +			       (file->f_flags & O_SYNC) ? 1 : 0);
>  }
>  EXPORT_SYMBOL(generic_write_sync);
>  
Shouldn't this be testing for

   file->f_flags & __O_SYNC

?

--
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