fuse: hotfix truncate_pagecache() issue
[linux-block.git] / fs / fuse / inode.c
index 0b578598c6ac8a66f17ed7f4511d7ec0cf9132db..e0fe703ee3d681156ed2e2b20610e8ee6d72131a 100644 (file)
@@ -201,7 +201,8 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
        struct timespec old_mtime;
 
        spin_lock(&fc->lock);
-       if (attr_version != 0 && fi->attr_version > attr_version) {
+       if ((attr_version != 0 && fi->attr_version > attr_version) ||
+           test_bit(FUSE_I_SIZE_UNSTABLE, &fi->state)) {
                spin_unlock(&fc->lock);
                return;
        }