From: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
To: hch@infradead.org, viro@zeniv.linux.org.uk, adilger@sun.com,
corbet@lwn.net, neilb@suse.de, npiggin@kernel.dk,
hooanon05@yahoo.co.jp, bfields@fieldses.org, miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org, sfrench@us.ibm.com,
philippe.deniel@CEA.FR, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -V20 03/12] vfs: Add open by file handle support
Date: Wed, 29 Sep 2010 10:57:13 +0530 [thread overview]
Message-ID: <m3pqvx86ha.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1285702610-32733-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Wed, 29 Sep 2010 01:06:41 +0530, "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> fs/compat.c | 11 +++
> fs/exportfs/expfs.c | 2 +
> fs/namei.c | 223 +++++++++++++++++++++++++++++++++++++++++++---
> fs/open.c | 32 ++++++-
> include/linux/fs.h | 10 ++-
> include/linux/namei.h | 1 +
> include/linux/syscalls.h | 3 +
> 7 files changed, 263 insertions(+), 19 deletions(-)
>
> diff --git a/fs/compat.c b/fs/compat.c
> index 0644a15..4a423fa 100644
> --- a/fs/compat.c
> +++ b/fs/compat.c
> @@ -2334,3 +2334,14 @@ asmlinkage long compat_sys_timerfd_gettime(int ufd,
> }
>
> #endif /* CONFIG_TIMERFD */
> +
> +/*
> + * Exactly like fs/open.c:sys_open_by_handle_at(), except that it
> + * doesn't set the O_LARGEFILE flag.
> + */
> +asmlinkage long
> +compat_sys_open_by_handle_at(int mountdirfd,
> + struct file_handle __user *handle, int flags)
> +{
> + return do_handle_open(mountdirfd, handle, flags);
> +}
> diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
> index cfee0f0..05a1179 100644
> --- a/fs/exportfs/expfs.c
> +++ b/fs/exportfs/expfs.c
> @@ -373,6 +373,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
> /*
> * Try to get any dentry for the given file handle from the filesystem.
> */
> + if (!nop || !nop->fh_to_dentry)
> + return ERR_PTR(-ESTALE);
> result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
> if (!result)
> result = ERR_PTR(-ESTALE);
> diff --git a/fs/namei.c b/fs/namei.c
> index 24896e8..3439962 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -32,6 +32,7 @@
> #include <linux/fcntl.h>
> #include <linux/device_cgroup.h>
> #include <linux/fs_struct.h>
> +#include <linux/exportfs.h>
> #include <asm/uaccess.h>
>
> #include "internal.h"
> @@ -1050,6 +1051,29 @@ out_fail:
> return retval;
> }
>
> +struct vfsmount *get_vfsmount_from_fd(int fd)
> +{
> + int fput_needed;
> + struct path path;
> + struct file *filep;
> +
> + if (fd == AT_FDCWD) {
> + struct fs_struct *fs = current->fs;
> + spin_lock(&fs->lock);
> + path = fs->pwd;
> + mntget(path.mnt);
> + spin_lock(&fs->lock);
That should be spin_unlock. A missing stg refresh before sending the
patch series.
-aneesh
next prev parent reply other threads:[~2010-09-29 5:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 19:36 [PATCH -V20 00/12] Generic name to handle and open by handle syscalls Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 01/12] exportfs: Return the minimum required handle size Aneesh Kumar K.V
2010-09-28 19:52 ` J. Bruce Fields
2010-09-29 5:34 ` Aneesh Kumar K. V
2010-09-28 19:36 ` [PATCH -V20 02/12] vfs: Add name to file handle conversion support Aneesh Kumar K.V
2010-09-28 20:30 ` J. Bruce Fields
2010-09-29 8:16 ` Aneesh Kumar K. V
2010-09-29 17:26 ` Sage Weil
2010-09-30 5:26 ` Aneesh Kumar K. V
2010-09-28 19:36 ` [PATCH -V20 03/12] vfs: Add open by file handle support Aneesh Kumar K.V
2010-09-29 5:27 ` Aneesh Kumar K. V [this message]
2010-09-28 19:36 ` [PATCH -V20 04/12] vfs: Add handle based readlink syscall Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 05/12] vfs: Add handle based stat syscall Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 06/12] vfs: Add handle based link syscall Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 07/12] x86: Add new syscalls for x86_32 Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 08/12] x86: Add new syscalls for x86_64 Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 09/12] unistd.h: Add new syscalls numbers to asm-generic Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 10/12] vfs: Export file system uuid via /proc/<pid>/mountinfo Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 11/12] ext3: Copy fs UUID to superblock Aneesh Kumar K.V
2010-09-28 19:36 ` [PATCH -V20 12/12] ext4: " Aneesh Kumar K.V
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=m3pqvx86ha.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=adilger@sun.com \
--cc=bfields@fieldses.org \
--cc=corbet@lwn.net \
--cc=hch@infradead.org \
--cc=hooanon05@yahoo.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=neilb@suse.de \
--cc=npiggin@kernel.dk \
--cc=philippe.deniel@CEA.FR \
--cc=sfrench@us.ibm.com \
--cc=viro@zeniv.linux.org.uk \
/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.