fuse: fix bad inode
[linux-2.6-microblaze.git] / fs / fuse / acl.c
index 5a48cee..f529075 100644 (file)
@@ -19,6 +19,9 @@ struct posix_acl *fuse_get_acl(struct inode *inode, int type)
        void *value = NULL;
        struct posix_acl *acl;
 
+       if (fuse_is_bad(inode))
+               return ERR_PTR(-EIO);
+
        if (!fc->posix_acl || fc->no_getxattr)
                return NULL;
 
@@ -53,6 +56,9 @@ int fuse_set_acl(struct inode *inode, struct posix_acl *acl, int type)
        const char *name;
        int ret;
 
+       if (fuse_is_bad(inode))
+               return -EIO;
+
        if (!fc->posix_acl || fc->no_setxattr)
                return -EOPNOTSUPP;