diff mbox

fs/ceph: No need get inode of parent in ceph_open.

Message ID 6AA21C22F0A5DA478922644AD2EC308C1D19FBFC@SHSMSX101.ccr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ma, Jianpeng Aug. 17, 2015, 8:43 a.m. UTC
For ceph_open, it already get the parent inode. So no need to get again.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
---
 fs/ceph/file.c | 3 ---
 1 file changed, 3 deletions(-)

--
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Yan, Zheng Aug. 17, 2015, 9:51 a.m. UTC | #1
It seems all of your patches are malformed. please use 'git send-email’ to send patch.

Regards
Yan, Zheng


> On Aug 17, 2015, at 16:43, Ma, Jianpeng <jianpeng.ma@intel.com> wrote:
> 
> For ceph_open, it already get the parent inode. So no need to get again.
> 
> Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
> ---
> fs/ceph/file.c | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 8b79d87..5ecd3dc 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -210,10 +210,7 @@ int ceph_open(struct inode *inode, struct file *file)
>        ihold(inode);
> 
>        req->r_num_caps = 1;
> -       if (flags & O_CREAT)
> -               parent_inode = ceph_get_dentry_parent_inode(file->f_path.dentry);
>        err = ceph_mdsc_do_request(mdsc, parent_inode, req);
> -       iput(parent_inode);
>        if (!err)
>                err = ceph_init_file(inode, file, req->r_fmode);
>        ceph_mdsc_put_request(req);
> --
> 2.4.3
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yan, Zheng Aug. 18, 2015, 2:36 a.m. UTC | #2
> On Aug 17, 2015, at 16:43, Ma, Jianpeng <jianpeng.ma@intel.com> wrote:
> 
> For ceph_open, it already get the parent inode. So no need to get again.
> 
> Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
> ---
> fs/ceph/file.c | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 8b79d87..5ecd3dc 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -210,10 +210,7 @@ int ceph_open(struct inode *inode, struct file *file)
>        ihold(inode);
> 
>        req->r_num_caps = 1;
> -       if (flags & O_CREAT)
> -               parent_inode = ceph_get_dentry_parent_inode(file->f_path.dentry);
>        err = ceph_mdsc_do_request(mdsc, parent_inode, req);
> -       iput(parent_inode);
>        if (!err)
>                err = ceph_init_file(inode, file, req->r_fmode);
>        ceph_mdsc_put_request(req);
> —

I fixed your patches (all tabs are replaced by spaces in your patches)  and added them to our testing branch

Thanks
Yan, Zheng

> 2.4.3
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ma, Jianpeng Aug. 19, 2015, 2:16 a.m. UTC | #3
Thanks very much zheng. I'll pay more attention to the format of patch.

Jianpeng


> -----Original Message-----

> From: Yan, Zheng [mailto:zyan@redhat.com]

> Sent: Tuesday, August 18, 2015 10:36 AM

> To: Ma, Jianpeng

> Cc: Sage Weil; ceph-devel@vger.kernel.org

> Subject: Re: [PATCH] fs/ceph: No need get inode of parent in ceph_open.

> 

> 

> > On Aug 17, 2015, at 16:43, Ma, Jianpeng <jianpeng.ma@intel.com> wrote:

> >

> > For ceph_open, it already get the parent inode. So no need to get again.

> >

> > Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>

> > ---

> > fs/ceph/file.c | 3 ---

> > 1 file changed, 3 deletions(-)

> >

> > diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 8b79d87..5ecd3dc

> > 100644

> > --- a/fs/ceph/file.c

> > +++ b/fs/ceph/file.c

> > @@ -210,10 +210,7 @@ int ceph_open(struct inode *inode, struct file *file)

> >        ihold(inode);

> >

> >        req->r_num_caps = 1;

> > -       if (flags & O_CREAT)

> > -               parent_inode =

> ceph_get_dentry_parent_inode(file->f_path.dentry);

> >        err = ceph_mdsc_do_request(mdsc, parent_inode, req);

> > -       iput(parent_inode);

> >        if (!err)

> >                err = ceph_init_file(inode, file, req->r_fmode);

> >        ceph_mdsc_put_request(req);

> > —

> 

> I fixed your patches (all tabs are replaced by spaces in your patches)  and

> added them to our testing branch

> 

> Thanks

> Yan, Zheng

> 

> > 2.4.3

> >
diff mbox

Patch

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 8b79d87..5ecd3dc 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -210,10 +210,7 @@  int ceph_open(struct inode *inode, struct file *file)
        ihold(inode);

        req->r_num_caps = 1;
-       if (flags & O_CREAT)
-               parent_inode = ceph_get_dentry_parent_inode(file->f_path.dentry);
        err = ceph_mdsc_do_request(mdsc, parent_inode, req);
-       iput(parent_inode);
        if (!err)
                err = ceph_init_file(inode, file, req->r_fmode);
        ceph_mdsc_put_request(req);