NFSv4.1: layoutcommit
[linux-2.6-block.git] / fs / nfs / file.c
index d85a534b15cd1805175345a2e94538f2fcefe10e..85cb95de5df5a0623350abaee80d305cfcd426a1 100644 (file)
@@ -326,6 +326,9 @@ nfs_file_fsync(struct file *file, int datasync)
                ret = xchg(&ctx->error, 0);
        if (!ret && status < 0)
                ret = status;
+       if (!ret && !datasync)
+               /* application has asked for meta-data sync */
+               ret = pnfs_layoutcommit_inode(inode, 1);
        return ret;
 }