[2/4] ceph: fix dentry leak in ceph_readdir_prepopulate
diff mbox series

Message ID 20180928094355.6049-2-zyan@redhat.com
State New
Headers show
Series
  • Untitled series #24311
Related show

Commit Message

Yan, Zheng Sept. 28, 2018, 9:43 a.m. UTC
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
---
 fs/ceph/inode.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jeff Layton Oct. 11, 2018, 3:08 p.m. UTC | #1
On Fri, 2018-09-28 at 17:43 +0800, Yan, Zheng wrote:
> Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
> ---
>  fs/ceph/inode.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index 375924b2bc86..a58e82a64545 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -1684,7 +1684,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
>  			if (IS_ERR(realdn)) {
>  				err = PTR_ERR(realdn);
>  				d_drop(dn);
> -				dn = NULL;
>  				goto next_item;
>  			}
>  			dn = realdn;

Reviewed-by: Jeff Layton <jlayton@redhat.com>

Patch
diff mbox series

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 375924b2bc86..a58e82a64545 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1684,7 +1684,6 @@  int ceph_readdir_prepopulate(struct ceph_mds_request *req,
 			if (IS_ERR(realdn)) {
 				err = PTR_ERR(realdn);
 				d_drop(dn);
-				dn = NULL;
 				goto next_item;
 			}
 			dn = realdn;