fuse: refresh stale attributes in fuse_permission()
[deliverable/linux.git] / fs / fuse / file.c
index 90ce7c5f7b593157bfffc4881bb57c691e687e84..f3ef2bde983b0e9df294126c4f8331d672ba0ebb 100644 (file)
@@ -87,7 +87,7 @@ void fuse_finish_open(struct inode *inode, struct file *file,
        if (outarg->open_flags & FOPEN_DIRECT_IO)
                file->f_op = &fuse_direct_io_file_operations;
        if (!(outarg->open_flags & FOPEN_KEEP_CACHE))
-               invalidate_mapping_pages(inode->i_mapping, 0, -1);
+               invalidate_inode_pages2(inode->i_mapping);
        ff->fh = outarg->fh;
        file->private_data = fuse_file_get(ff);
 }
@@ -106,14 +106,6 @@ int fuse_open_common(struct inode *inode, struct file *file, int isdir)
        if (err)
                return err;
 
-       /* If opening the root node, no lookup has been performed on
-          it, so the attributes must be refreshed */
-       if (get_node_id(inode) == FUSE_ROOT_ID) {
-               err = fuse_do_getattr(inode);
-               if (err)
-                       return err;
-       }
-
        ff = fuse_file_alloc();
        if (!ff)
                return -ENOMEM;
This page took 0.02502 seconds and 5 git commands to generate.