summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorJoel Becker <jlbec@evilplan.org>2011-08-21 21:02:57 -0700
committerJoel Becker <jlbec@evilplan.org>2011-08-21 21:02:57 -0700
commit99b1bb61b225c3eb4d3b196d4f1d041695b19a7e (patch)
tree06cabdc34538f3b38a39e3b802ecc1a2ab2aae00 /fs/fuse/dir.c
parentc7e25e6e0b0486492c5faaf6312b37413642c48e (diff)
parent93862d5e1ab875664c6cc95254fc365028a48bb1 (diff)
downloadop-kernel-dev-99b1bb61b225c3eb4d3b196d4f1d041695b19a7e.zip
op-kernel-dev-99b1bb61b225c3eb4d3b196d4f1d041695b19a7e.tar.gz
Merge branch 'mw-3.1-jul25' of git://oss.oracle.com/git/smushran/linux-2.6 into ocfs2-fixes
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index d5016071..9f63e49 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -382,7 +382,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode,
struct fuse_entry_out outentry;
struct fuse_file *ff;
struct file *file;
- int flags = nd->intent.open.flags - 1;
+ int flags = nd->intent.open.flags;
if (fc->no_create)
return -ENOSYS;
@@ -576,7 +576,7 @@ static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode,
static int fuse_create(struct inode *dir, struct dentry *entry, int mode,
struct nameidata *nd)
{
- if (nd && (nd->flags & LOOKUP_OPEN)) {
+ if (nd) {
int err = fuse_create_open(dir, entry, mode, nd);
if (err != -ENOSYS)
return err;
@@ -971,9 +971,9 @@ static int fuse_access(struct inode *inode, int mask)
return err;
}
-static int fuse_perm_getattr(struct inode *inode, int flags)
+static int fuse_perm_getattr(struct inode *inode, int mask)
{
- if (flags & IPERM_FLAG_RCU)
+ if (mask & MAY_NOT_BLOCK)
return -ECHILD;
return fuse_do_getattr(inode, NULL, NULL);
@@ -992,7 +992,7 @@ static int fuse_perm_getattr(struct inode *inode, int flags)
* access request is sent. Execute permission is still checked
* locally based on file mode.
*/
-static int fuse_permission(struct inode *inode, int mask, unsigned int flags)
+static int fuse_permission(struct inode *inode, int mask)
{
struct fuse_conn *fc = get_fuse_conn(inode);
bool refreshed = false;
@@ -1011,23 +1011,22 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags)
if (fi->i_time < get_jiffies_64()) {
refreshed = true;
- err = fuse_perm_getattr(inode, flags);
+ err = fuse_perm_getattr(inode, mask);
if (err)
return err;
}
}
if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
- err = generic_permission(inode, mask, flags, NULL);
+ err = generic_permission(inode, mask);
/* If permission is denied, try to refresh file
attributes. This is also needed, because the root
node will at first have no permissions */
if (err == -EACCES && !refreshed) {
- err = fuse_perm_getattr(inode, flags);
+ err = fuse_perm_getattr(inode, mask);
if (!err)
- err = generic_permission(inode, mask,
- flags, NULL);
+ err = generic_permission(inode, mask);
}
/* Note: the opposite of the above test does not
@@ -1035,7 +1034,7 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags)
noticed immediately, only after the attribute
timeout has expired */
} else if (mask & (MAY_ACCESS | MAY_CHDIR)) {
- if (flags & IPERM_FLAG_RCU)
+ if (mask & MAY_NOT_BLOCK)
return -ECHILD;
err = fuse_access(inode, mask);
@@ -1044,7 +1043,7 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags)
if (refreshed)
return -EACCES;
- err = fuse_perm_getattr(inode, flags);
+ err = fuse_perm_getattr(inode, mask);
if (!err && !(inode->i_mode & S_IXUGO))
return -EACCES;
}
@@ -1177,9 +1176,10 @@ static int fuse_dir_release(struct inode *inode, struct file *file)
return 0;
}
-static int fuse_dir_fsync(struct file *file, int datasync)
+static int fuse_dir_fsync(struct file *file, loff_t start, loff_t end,
+ int datasync)
{
- return fuse_fsync_common(file, datasync, 1);
+ return fuse_fsync_common(file, start, end, datasync, 1);
}
static bool update_mtime(unsigned ivalid)
OpenPOWER on IntegriCloud