diff --git a/[refs] b/[refs] index 91a75bab3c25..65274401b354 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 49d4914fd7c10ae846d0f30d5f6f4732cc68499c +refs/heads/master: d139d7ffd0c1e81e2a809909b4f8b121a0dc119a diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 464eeccb675b..1e5c71669164 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1659,8 +1659,10 @@ int may_open(struct nameidata *nd, int acc_mode, int flag) error = locks_verify_locked(inode); if (!error) { DQUOT_INIT(inode); - - error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL); + + error = do_truncate(dentry, 0, + ATTR_MTIME|ATTR_CTIME|ATTR_OPEN, + NULL); } put_write_access(inode); if (error) diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h index e3fc5dbb2246..6a4d170ad9a5 100644 --- a/trunk/include/linux/fs.h +++ b/trunk/include/linux/fs.h @@ -330,6 +330,7 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, #define ATTR_KILL_SGID 4096 #define ATTR_FILE 8192 #define ATTR_KILL_PRIV 16384 +#define ATTR_OPEN 32768 /* Truncating from open(O_TRUNC) */ /* * This is the Inode Attributes structure, used for notify_change(). It