]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fuse/dir.c
fuse: add atomic open+truncate support
[linux-2.6-omap-h63xx.git] / fs / fuse / dir.c
index 537d38bee13ca4fd7ea26f5b86506d4909c2bcd5..052327bd6c9dcb42587073ebb0de65cc0d94f5f1 100644 (file)
@@ -1083,6 +1083,9 @@ static int fuse_do_setattr(struct dentry *entry, struct iattr *attr,
                        return err;
        }
 
+       if ((attr->ia_valid & ATTR_OPEN) && fc->atomic_o_trunc)
+               return 0;
+
        if (attr->ia_valid & ATTR_SIZE) {
                unsigned long limit;
                if (IS_SWAPFILE(inode))