]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/open.c
[PATCH] ftruncate does not always update m/ctime
[net-next-2.6.git] / fs / open.c
index a37ff861108f93222cbf12d4e19269e8d71555c0..303f06d2a7b92e8e001489cf2b1db17bdae6bd0c 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -322,7 +322,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
 
        error = locks_verify_truncate(inode, file, length);
        if (!error)
-               error = do_truncate(dentry, length, 0, file);
+               error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);
 out_putf:
        fput(file);
 out:
@@ -1152,7 +1152,7 @@ int filp_close(struct file *filp, fl_owner_t id)
        }
 
        if (filp->f_op && filp->f_op->flush)
-               retval = filp->f_op->flush(filp);
+               retval = filp->f_op->flush(filp, id);
 
        dnotify_flush(filp, id);
        locks_remove_posix(filp, id);