a***@public.gmane.org
2014-10-13 14:08:15 UTC
From: Andy Adamson <andros-HgOvQuBEEgTQT0dZR+***@public.gmane.org>
If a pgio error is caught before the nfs_pgio_header args->context is set
with get_nfs_open_context, the context can be NULL.
Signed-off-by: Andy Adamson <andros-HgOvQuBEEgTQT0dZR+***@public.gmane.org>
---
fs/nfs/inode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 141c9f4..a2b148e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -798,6 +798,9 @@ static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync)
struct inode *inode = ctx->dentry->d_inode;
struct super_block *sb = ctx->dentry->d_sb;
+ if (ctx == NULL)
+ return;
+
if (!list_empty(&ctx->list)) {
if (!atomic_dec_and_lock(&ctx->lock_context.count, &inode->i_lock))
return;
If a pgio error is caught before the nfs_pgio_header args->context is set
with get_nfs_open_context, the context can be NULL.
Signed-off-by: Andy Adamson <andros-HgOvQuBEEgTQT0dZR+***@public.gmane.org>
---
fs/nfs/inode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 141c9f4..a2b148e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -798,6 +798,9 @@ static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync)
struct inode *inode = ctx->dentry->d_inode;
struct super_block *sb = ctx->dentry->d_sb;
+ if (ctx == NULL)
+ return;
+
if (!list_empty(&ctx->list)) {
if (!atomic_dec_and_lock(&ctx->lock_context.count, &inode->i_lock))
return;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html