aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 20:04:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 20:04:32 -0700
commit6ed0529fef09f50ef41d396cb55c5519e4936b16 (patch)
tree09d83956d0c386fc62440243c903ca889f34ab2c /fs/nfs/internal.h
parentMerge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
parentNFS: various changes relating to reporting IO errors. (diff)
downloadlinux-dev-6ed0529fef09f50ef41d396cb55c5519e4936b16.tar.xz
linux-dev-6ed0529fef09f50ef41d396cb55c5519e4936b16.zip
Merge tag 'nfs-for-4.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull more NFS client updates from Trond Myklebust: "Hightlights include: Bugfixes: - Various changes relating to reporting IO errors. - pnfs: Use the standard I/O stateid when calling LAYOUTGET Features: - Add static NFS I/O tracepoints for debugging" * tag 'nfs-for-4.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: various changes relating to reporting IO errors. NFS: Add static NFS I/O tracepoints pNFS: Use the standard I/O stateid when calling LAYOUTGET
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 68cc22083639..5bdf952f414b 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -768,3 +768,10 @@ static inline bool nfs_error_is_fatal(int err)
return false;
}
}
+
+static inline void nfs_context_set_write_error(struct nfs_open_context *ctx, int error)
+{
+ ctx->error = error;
+ smp_wmb();
+ set_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
+}