From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Ilya Dryomov <ilya.dryomov@inktank.com>,
Sage Weil <sage@inktank.com>, Dave Jones <davej@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ceph-devel@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Guangliang Zhao <lucienchao@gmail.com>,
Li Wang <li.wang@ubuntykylin.com>,
zheng.z.yan@intel.com
Subject: Re: [PATCH v2] ceph: fix posix ACL hooks
Date: Mon, 3 Feb 2014 21:59:08 +0000 [thread overview]
Message-ID: <20140203215908.GD10323@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFytvTPdBsv6BwSomUGWXZ_tKP=BxaeJ7FXBft0JNnjBCQ@mail.gmail.com>
On Mon, Feb 03, 2014 at 01:03:32PM -0800, Linus Torvalds wrote:
> - err = vfs_mkdir(path.dentry->d_inode, dentry, mode);
> + err = vfs_mkdir(path.dentry, dentry, mode);
Pointless - path.dentry == dentry->d_parent anyway.
> - err = vfs_mknod(path.dentry->d_inode, dentry, mode, dev->devt);
> + err = vfs_mknod(path.dentry, dentry, mode, dev->devt);
Ditto.
> @@ -237,7 +237,7 @@ static int dev_rmdir(const char *name)
> return PTR_ERR(dentry);
> if (dentry->d_inode) {
> if (dentry->d_inode->i_private == &thread)
> - err = vfs_rmdir(parent.dentry->d_inode, dentry);
> + err = vfs_rmdir(parent.dentry, dentry);
Ditto, with s/path/parent/
> @@ -324,7 +324,7 @@ static int handle_remove(const char *nodename, struct device *dev)
> mutex_lock(&dentry->d_inode->i_mutex);
> notify_change(dentry, &newattrs, NULL);
> mutex_unlock(&dentry->d_inode->i_mutex);
> - err = vfs_unlink(parent.dentry->d_inode, dentry, NULL);
> + err = vfs_unlink(parent.dentry, dentry, NULL);
> if (!err || err == -ENOENT)
> deleted = 1;
> }
And here as well.
> +++ b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
> @@ -222,8 +222,8 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt,
> if (IS_ERR(dchild_new))
> GOTO(put_old, err = PTR_ERR(dchild_new));
>
> - err = ll_vfs_rename(dir->d_inode, dchild_old, mnt,
> - dir->d_inode, dchild_new, mnt, NULL);
> + err = ll_vfs_rename(dir, dchild_old, mnt,
> + dir, dchild_new, mnt, NULL);
... and again, that's completely pointless.
> -int afs_permission(struct inode *inode, int mask)
> +int afs_permission(struct dentry *dentry, struct inode *inode, int mask)
Oh, _lovely_. So not only do we pass dentry, the arguments are redundant
as well.
> -static inline int btrfs_may_create(struct inode *dir, struct dentry *child)
> +static inline int btrfs_may_create(struct dentry *parent, struct dentry *child)
I'm fairly sure that it's also pointless, because parent is going to be, well,
the parent. Of child.
> +static int gfs2_vfs_permission(struct dentry *dentry, struct inode *inode, int mask)
> +{
> + return gfs2_permission(inode, mask);
> +}
Er... You do realize that callers of gfs2_permission() tend to have
the dentry in question, either directly or as ->d_parent of something
they have?
I really hate the whole thing... ;-/
next prev parent reply other threads:[~2014-02-03 21:59 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 18:40 [GIT PULL] Ceph updates for -rc1 Sage Weil
2014-01-28 21:10 ` Dave Jones
2014-01-28 21:48 ` Linus Torvalds
2014-01-29 6:08 ` Sage Weil
2014-01-29 14:30 ` Sage Weil
2014-01-29 14:30 ` Sage Weil
2014-01-29 16:36 ` Ilya Dryomov
2014-01-29 16:37 ` [PATCH v2] ceph: fix posix ACL hooks Ilya Dryomov
2014-01-29 19:09 ` Linus Torvalds
2014-01-30 7:54 ` Christoph Hellwig
2014-01-30 22:01 ` Linus Torvalds
2014-01-31 0:14 ` Sage Weil
2014-02-03 10:29 ` Christoph Hellwig
2014-02-03 11:13 ` Al Viro
2014-02-03 21:03 ` Linus Torvalds
2014-02-03 21:19 ` Al Viro
2014-02-03 21:24 ` Christoph Hellwig
2014-02-03 21:31 ` Al Viro
2014-02-03 21:36 ` Christoph Hellwig
2014-02-03 21:37 ` Linus Torvalds
2014-02-03 21:42 ` Al Viro
2014-02-03 21:31 ` Linus Torvalds
2014-02-03 21:39 ` Al Viro
2014-02-03 21:43 ` Al Viro
2014-02-03 21:44 ` Linus Torvalds
2014-02-03 22:31 ` Al Viro
2014-02-06 20:51 ` Jeremy Allison
2014-02-03 21:23 ` Christoph Hellwig
2014-02-03 21:23 ` [Cluster-devel] " Christoph Hellwig
2014-02-03 21:59 ` Al Viro [this message]
2014-02-03 22:12 ` Linus Torvalds
2014-02-03 22:40 ` Al Viro
2014-02-03 22:55 ` Linus Torvalds
2014-02-04 11:33 ` Steven Whitehouse
2014-02-04 15:57 ` Christoph Hellwig
2014-02-04 16:17 ` Linus Torvalds
2014-02-03 21:59 ` Linus Torvalds
2014-01-29 20:43 ` Ilya Dryomov
2014-01-30 10:46 ` [GIT PULL] Ceph updates for -rc1 Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140203215908.GD10323@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=ceph-devel@vger.kernel.org \
--cc=davej@redhat.com \
--cc=hch@infradead.org \
--cc=ilya.dryomov@inktank.com \
--cc=li.wang@ubuntykylin.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucienchao@gmail.com \
--cc=sage@inktank.com \
--cc=torvalds@linux-foundation.org \
--cc=zheng.z.yan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.