Re: [PATCH] vfs: simply the code logic

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

 



On Sat, Jul 21, 2012 at 11:38:19PM +0800, zwu.kernel@xxxxxxxxx wrote:
>  	if (offset >= 0 && offset <= size) {
> -		if (offset != file->f_pos) {
> -			file->f_pos = offset;
> -		}
> -		retval = offset;
> +		retval = file->f_pos = offset;
>  	}

But now you're writing to f_pos unconditionally.  That may cause
cacheline bouncing.  NAK.

Plus, you're now using a less-well-known feature of C, so while it's fewer
lines of code, it's not necessarily a simplification.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux