aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/9p/v9fs_vfs.h1
-rw-r--r--fs/9p/vfs_dir.c1
-rw-r--r--fs/9p/vfs_file.c4
-rw-r--r--include/net/9p/client.h2
-rw-r--r--net/9p/client.c7
5 files changed, 9 insertions, 6 deletions
diff --git a/fs/9p/v9fs_vfs.h b/fs/9p/v9fs_vfs.h
index d26db1932f7a..bab0eac873f4 100644
--- a/fs/9p/v9fs_vfs.h
+++ b/fs/9p/v9fs_vfs.h
@@ -65,5 +65,6 @@ int v9fs_uflags2omode(int uflags, int extended);
65ssize_t v9fs_file_readn(struct file *, char *, char __user *, u32, u64); 65ssize_t v9fs_file_readn(struct file *, char *, char __user *, u32, u64);
66void v9fs_blank_wstat(struct p9_wstat *wstat); 66void v9fs_blank_wstat(struct p9_wstat *wstat);
67int v9fs_vfs_setattr_dotl(struct dentry *, struct iattr *); 67int v9fs_vfs_setattr_dotl(struct dentry *, struct iattr *);
68int v9fs_file_fsync_dotl(struct file *filp, int datasync);
68 69
69#define P9_LOCK_TIMEOUT (30*HZ) 70#define P9_LOCK_TIMEOUT (30*HZ)
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 170f5bb8ebe0..b84ebe8cefed 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -315,4 +315,5 @@ const struct file_operations v9fs_dir_operations_dotl = {
315 .readdir = v9fs_dir_readdir_dotl, 315 .readdir = v9fs_dir_readdir_dotl,
316 .open = v9fs_file_open, 316 .open = v9fs_file_open,
317 .release = v9fs_dir_release, 317 .release = v9fs_dir_release,
318 .fsync = v9fs_file_fsync_dotl,
318}; 319};
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 3a4352f23a98..240c30674396 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -491,7 +491,7 @@ static int v9fs_file_fsync(struct file *filp, int datasync)
491 return retval; 491 return retval;
492} 492}
493 493
494static int v9fs_file_fsync_dotl(struct file *filp, int datasync) 494int v9fs_file_fsync_dotl(struct file *filp, int datasync)
495{ 495{
496 struct p9_fid *fid; 496 struct p9_fid *fid;
497 int retval; 497 int retval;
@@ -501,7 +501,7 @@ static int v9fs_file_fsync_dotl(struct file *filp, int datasync)
501 501
502 fid = filp->private_data; 502 fid = filp->private_data;
503 503
504 retval = p9_client_fsync(fid); 504 retval = p9_client_fsync(fid, datasync);
505 return retval; 505 return retval;
506} 506}
507 507
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index 335b088e7672..83ba6a4d58a3 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -229,7 +229,7 @@ int p9_client_symlink(struct p9_fid *fid, char *name, char *symname, gid_t gid,
229int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, 229int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode,
230 gid_t gid, struct p9_qid *qid); 230 gid_t gid, struct p9_qid *qid);
231int p9_client_clunk(struct p9_fid *fid); 231int p9_client_clunk(struct p9_fid *fid);
232int p9_client_fsync(struct p9_fid *fid); 232int p9_client_fsync(struct p9_fid *fid, int datasync);
233int p9_client_remove(struct p9_fid *fid); 233int p9_client_remove(struct p9_fid *fid);
234int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, 234int p9_client_read(struct p9_fid *fid, char *data, char __user *udata,
235 u64 offset, u32 count); 235 u64 offset, u32 count);
diff --git a/net/9p/client.c b/net/9p/client.c
index e3cfdff37327..8df80fb86f23 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1165,17 +1165,18 @@ int p9_client_link(struct p9_fid *dfid, struct p9_fid *oldfid, char *newname)
1165} 1165}
1166EXPORT_SYMBOL(p9_client_link); 1166EXPORT_SYMBOL(p9_client_link);
1167 1167
1168int p9_client_fsync(struct p9_fid *fid) 1168int p9_client_fsync(struct p9_fid *fid, int datasync)
1169{ 1169{
1170 int err; 1170 int err;
1171 struct p9_client *clnt; 1171 struct p9_client *clnt;
1172 struct p9_req_t *req; 1172 struct p9_req_t *req;
1173 1173
1174 P9_DPRINTK(P9_DEBUG_9P, ">>> TFSYNC fid %d\n", fid->fid); 1174 P9_DPRINTK(P9_DEBUG_9P, ">>> TFSYNC fid %d datasync:%d\n",
1175 fid->fid, datasync);
1175 err = 0; 1176 err = 0;
1176 clnt = fid->clnt; 1177 clnt = fid->clnt;
1177 1178
1178 req = p9_client_rpc(clnt, P9_TFSYNC, "d", fid->fid); 1179 req = p9_client_rpc(clnt, P9_TFSYNC, "dd", fid->fid, datasync);
1179 if (IS_ERR(req)) { 1180 if (IS_ERR(req)) {
1180 err = PTR_ERR(req); 1181 err = PTR_ERR(req);
1181 goto error; 1182 goto error;