Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebfc3b49 authored by Al Viro's avatar Al Viro
Browse files

don't pass nameidata to ->create()



boolean "does it have to be exclusive?" flag is passed instead;
Local filesystem should just ignore it - the object is guaranteed
not to be there yet.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 72bd866a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ d_manage: no no yes (ref-walk) maybe

--------------------------- inode_operations --------------------------- 
prototypes:
	int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *);
	int (*create) (struct inode *,struct dentry *,umode_t, bool);
	struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
	int (*link) (struct dentry *,struct inode *,struct dentry *);
	int (*unlink) (struct inode *,struct dentry *);
+6 −0
Original line number Diff line number Diff line
@@ -436,3 +436,9 @@ d_make_root() drops the reference to inode if dentry allocation fails.
[mandatory]
	The witch is dead!  Well, 2/3 of it, anyway.  ->d_revalidate() and
->lookup() do *not* take struct nameidata anymore; just the flags.
--
[mandatory]
	->create() doesn't take struct nameidata *; unlike the previous
two, it gets "is it an O_EXCL or equivalent?" boolean argument.  Note that
local filesystems can ignore tha argument - they are guaranteed that the
object doesn't exist.  It's remote/distributed ones that might care...
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ This describes how the VFS can manipulate an inode in your
filesystem. As of kernel 2.6.22, the following members are defined:

struct inode_operations {
	int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *);
	int (*create) (struct inode *,struct dentry *, umode_t, bool);
	struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
	int (*link) (struct dentry *,struct inode *,struct dentry *);
	int (*unlink) (struct inode *,struct dentry *);
+1 −1
Original line number Diff line number Diff line
@@ -725,7 +725,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,

static int
v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
		struct nameidata *nd)
		bool excl)
{
	struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir);
	u32 perm = unixmode2p9mode(v9ses, mode);
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ int v9fs_open_to_dotl_flags(int flags)

static int
v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
		struct nameidata *nd)
		bool excl)
{
	return v9fs_vfs_mknod_dotl(dir, dentry, omode, 0);
}
Loading