> -int do_truncate(struct dentry *dentry, loff_t length, struct file *filp)
> +int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
> + struct file *filp)
> {
> int err;
> struct iattr newattrs;
> @@ -204,7 +205,7 @@ int do_truncate(struct dentry *dentry, l
> return -EINVAL;
>
> newattrs.ia_size = length;
> - newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
> + newattrs.ia_valid = ATTR_SIZE | time_attrs;
I'd rather make the argument and boolean update_times flag and this:
newattrs.ia_valid = ATTR_SIZE;
if (update_times)
newattrs.ia_valid |= ATTR_CTIME|ATTR_MTIME;
but except for that little nitpick the patch looks good. thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]