Re: [PATCH] ceph: Using file->f_flags rather than flags check O_CREAT.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 13, 2015 at 5:01 PM, Ma, Jianpeng <jianpeng.ma@xxxxxxxxx> wrote:
> Because flags removed the O_CREAT, so we should use file->f_flags.
>
> Signed-off-by: Jianpeng Ma <jianpeng.ma@xxxxxxxxx>
> ---
>  fs/ceph/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 8b79d87..e1347cf 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -210,7 +210,7 @@ int ceph_open(struct inode *inode, struct file *file)
>         ihold(inode);
>
>         req->r_num_caps = 1;
> -       if (flags & O_CREAT)
> +       if (file->f_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);

In this case, we do not need parent_inode because file already exists.
I'd like to remove the code that finds parent inode.


Regards
Yan, Zheng

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



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux