NFSv4: Convert nfs_alloc_seqid() to return an ERR_PTR() if allocation fails
When we relax the sequencing on the NFSv4.1 OPEN/CLOSE code, we will want to use the value NULL to indicate that no sequencing is needed. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
@@ -1003,11 +1003,11 @@ struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter, gfp_t gfp_m
|
||||
struct nfs_seqid *new;
|
||||
|
||||
new = kmalloc(sizeof(*new), gfp_mask);
|
||||
if (new != NULL) {
|
||||
new->sequence = counter;
|
||||
INIT_LIST_HEAD(&new->list);
|
||||
new->task = NULL;
|
||||
}
|
||||
if (new == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
new->sequence = counter;
|
||||
INIT_LIST_HEAD(&new->list);
|
||||
new->task = NULL;
|
||||
return new;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user