+2005-09-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't call ACCESS on open. Will do this properly with atomic
+ open/create
+
+ * Fix compile warning on 2.6.13 and later
+
2005-08-25 Miklos Szeredi <miklos@szeredi.hu>
* lib: add userspace side of ftruncate() method for experimentation
return -EACCES;
err = 0;
- if (nd &&
- ((nd->flags & LOOKUP_ACCESS) ||
- ((nd->flags & LOOKUP_OPEN) && mode != 0)))
+ if (nd && (nd->flags & LOOKUP_ACCESS))
err = fuse_access(inode, mask);
}
return err;
free_page((unsigned long) link);
}
-#ifdef KERNEL_2_6_8_PLUS
+#ifdef KERNEL_2_6_13_PLUS
+static void *fuse_follow_link(struct dentry *dentry, struct nameidata *nd)
+{
+ nd_set_link(nd, read_link(dentry));
+ return NULL;
+}
+
+static void fuse_put_link(struct dentry *dentry, struct nameidata *nd, void *c)
+{
+ free_link(nd_get_link(nd));
+}
+#elif defined(KERNEL_2_6_8_PLUS)
static int fuse_follow_link(struct dentry *dentry, struct nameidata *nd)
{
nd_set_link(nd, read_link(dentry));
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
# define KERNEL_2_6_10_PLUS
# endif
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+# define KERNEL_2_6_13_PLUS
+# endif
#endif
#include "config.h"
__u32 type;
};
+/** Valid attribute mask used in the SETATTR request */
#define FATTR_MODE (1 << 0)
#define FATTR_UID (1 << 1)
#define FATTR_GID (1 << 2)
#define FATTR_MTIME (1 << 5)
#define FATTR_CTIME (1 << 6)
+/**
+ * Flags returned by the OPEN request
+ *
+ * FOPEN_DIRECT_IO: bypass page cache for this open file
+ * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
+ */
#define FOPEN_DIRECT_IO (1 << 0)
#define FOPEN_KEEP_CACHE (1 << 1)