summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorSohaib Mohamed <sohaib.amhmd@gmail.com>2021-10-01 01:55:03 +0200
committerDominique Martinet <asmadeus@codewreck.org>2021-11-03 17:45:03 +0900
commit6d66ffc1293b9cfe42b91a9c175fb4f6e956adf6 (patch)
tree9bd466536eeecb275fc24a2c4cd4deeb0c1cf28f /fs/9p
parente4eeefbafc9dc237faf22f0f3dc5bdcb88ad9230 (diff)
9p: fix minor indentation and codestyle
Warnings found by checkpatch.pl Link: http://lkml.kernel.org/r/20210930235503.126033-1-sohaib.amhmd@gmail.com Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index b6a5a0be444d..61b29bad6d9a 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -71,6 +71,7 @@ static inline int dt_type(struct p9_wstat *mistat)
static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen)
{
struct p9_fid *fid = filp->private_data;
+
if (!fid->rdir)
fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL);
return fid->rdir;
@@ -108,6 +109,7 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)
if (rdir->tail == rdir->head) {
struct iov_iter to;
int n;
+
iov_iter_kvec(&to, READ, &kvec, 1, buflen);
n = p9_client_read(file->private_data, ctx->pos, &to,
&err);
@@ -233,5 +235,5 @@ const struct file_operations v9fs_dir_operations_dotl = {
.iterate_shared = v9fs_dir_readdir_dotl,
.open = v9fs_file_open,
.release = v9fs_dir_release,
- .fsync = v9fs_file_fsync_dotl,
+ .fsync = v9fs_file_fsync_dotl,
};