devmapper-ioctl 2.4.21 ...

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

 



Hi!

stumbled over the following code:

+	/* Don't update times for block devices using O_DIRECT */
+	if (!(file->f_flags & O_DIRECT) || !S_ISBLK(inode->i_mode)) {
+		inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+		mark_inode_dirty_sync(inode);
+	}

but [A:] S_ISBLK() should be true if the inode is a block device
[B:] (file->f_flags & O_DIRECT) should be true if O_DIRECT is requested

!(A || !B)  ==  (!A && B) (De Morgan)

so the times will be updated if the device is a
block device and O_DIRECT is not specified, correct?
but the comment says otherwise ...

please correct me, if I'm wrong ...

best,
Herbert


_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux