Commit 8a5e929d authored by Al Viro's avatar Al Viro
Browse files

don't transliterate lower bits of ->intent.open.flags to FMODE_...



->create() instances are much happier that way...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 554a8b9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -512,7 +512,7 @@ struct dentry *pohmelfs_lookup(struct inode *dir, struct dentry *dentry, struct
	int err, lock_type = POHMELFS_READ_LOCK, need_lock = 1;
	struct qstr str = dentry->d_name;

	if ((nd->intent.open.flags & O_ACCMODE) > 1)
	if ((nd->intent.open.flags & O_ACCMODE) != O_RDONLY)
		lock_type = POHMELFS_WRITE_LOCK;

	if (test_bit(NETFS_INODE_OWNED, &parent->state)) {
+1 −1
Original line number Diff line number Diff line
@@ -634,7 +634,7 @@ v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
	v9ses = v9fs_inode2v9ses(dir);
	perm = unixmode2p9mode(v9ses, mode);
	if (nd && nd->flags & LOOKUP_OPEN)
		flags = nd->intent.open.flags - 1;
		flags = nd->intent.open.flags;
	else
		flags = O_RDWR;

+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,

	v9ses = v9fs_inode2v9ses(dir);
	if (nd && nd->flags & LOOKUP_OPEN)
		flags = nd->intent.open.flags - 1;
		flags = nd->intent.open.flags;
	else {
		/*
		 * create call without LOOKUP_OPEN is due
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ struct dentry *ceph_lookup_open(struct inode *dir, struct dentry *dentry,
	struct inode *parent_inode = get_dentry_parent_inode(file->f_dentry);
	struct ceph_mds_request *req;
	int err;
	int flags = nd->intent.open.flags - 1;  /* silly vfs! */
	int flags = nd->intent.open.flags;

	dout("ceph_lookup_open dentry %p '%.*s' flags %d mode 0%o\n",
	     dentry, dentry->d_name.len, dentry->d_name.name, flags, mode);
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading