diff options
author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2005-01-04 21:40:47 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2005-01-04 21:40:47 +0100 |
commit | a635179e268fd1d7a09f01a2e644ca25aee884e5 (patch) | |
tree | 00ede2ee7536ec466082119da967b5ef014649b9 /fs | |
parent | ce1689115921ca8c8be39278b1ca09d286da21fb (diff) | |
download | history-a635179e268fd1d7a09f01a2e644ca25aee884e5.tar.gz |
Subject: [PATCH] NFS: Sync NFS writes still use kmalloc
Replace the kmalloc() and kfree() calls in this path with appropriate
invocations of nfs_writedata_alloc() and nfs_writedata_free(). This
makes nfs_writepage_sync match all the other write paths in fs/nfs/write.c.
Category: Maintainability, performance
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/write.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 847b77d4c7aedd..60326e6572bfbb 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -184,11 +184,10 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, int result, written = 0; struct nfs_write_data *wdata; - wdata = kmalloc(sizeof(*wdata), GFP_NOFS); + wdata = nfs_writedata_alloc(); if (!wdata) return -ENOMEM; - memset(wdata, 0, sizeof(*wdata)); wdata->flags = how; wdata->cred = ctx->cred; wdata->inode = inode; @@ -238,8 +237,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, io_error: nfs_end_data_update_defer(inode); - - kfree(wdata); + nfs_writedata_free(wdata); return written ? written : result; } |