Skip to content

Commit

Permalink
Merge fix/9p-fid-refcounts/5.15 into v5.15.59
Browse files Browse the repository at this point in the history
* commit '6bf7a2374418e370cabb63fcfb53fd1abd2939cd':
  net/9p: Initialize the iounit field during fid creation
  9p: Fix refcounting during full path walks for fid lookups
  9p: fix fid refcount leak in v9fs_vfs_get_link
  9p: fix fid refcount leak in v9fs_vfs_atomic_open_dotl
  • Loading branch information
tyhicks authored and RezaT4795 committed Aug 8, 2022
1 parent 79a9513 commit 15079c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,16 +897,13 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt)
struct p9_fid *fid;

p9_debug(P9_DEBUG_FID, "clnt %p\n", clnt);
fid = kmalloc(sizeof(struct p9_fid), GFP_KERNEL);
fid = kzalloc(sizeof(struct p9_fid), GFP_KERNEL);
if (!fid)
return NULL;

memset(&fid->qid, 0, sizeof(struct p9_qid));
fid->mode = -1;
fid->uid = current_fsuid();
fid->clnt = clnt;
fid->rdir = NULL;
fid->fid = 0;
refcount_set(&fid->count, 1);

idr_preload(GFP_KERNEL);
Expand Down

0 comments on commit 15079c4

Please sign in to comment.