]> Git Repo - linux.git/blobdiff - fs/nfs/write.c
Merge branch 'master' into for-linus
[linux.git] / fs / nfs / write.c
index 9f81bdd91c559c9f082e8fb3067cfe444da8b6b6..874972d9427c15d94e7ee7c9182fd5f4a3eb5968 100644 (file)
@@ -700,7 +700,9 @@ int nfs_flush_incompatible(struct file *file, struct page *page)
                req = nfs_page_find_request(page);
                if (req == NULL)
                        return 0;
-               do_flush = req->wb_page != page || req->wb_context != ctx;
+               do_flush = req->wb_page != page || req->wb_context != ctx ||
+                       req->wb_lock_context->lockowner != current->files ||
+                       req->wb_lock_context->pid != current->tgid;
                nfs_release_request(req);
                if (!do_flush)
                        return 0;
@@ -824,6 +826,7 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
        data->args.pages  = data->pagevec;
        data->args.count  = count;
        data->args.context = get_nfs_open_context(req->wb_context);
+       data->args.lock_context = req->wb_lock_context;
        data->args.stable  = NFS_UNSTABLE;
        if (how & FLUSH_STABLE) {
                data->args.stable = NFS_DATA_SYNC;
@@ -1047,9 +1050,9 @@ out:
 void nfs_write_prepare(struct rpc_task *task, void *calldata)
 {
        struct nfs_write_data *data = calldata;
-       struct nfs_client *clp = (NFS_SERVER(data->inode))->nfs_client;
 
-       if (nfs4_setup_sequence(clp, &data->args.seq_args,
+       if (nfs4_setup_sequence(NFS_SERVER(data->inode),
+                               &data->args.seq_args,
                                &data->res.seq_res, 1, task))
                return;
        rpc_call_start(task);
This page took 0.03344 seconds and 4 git commands to generate.