diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 966a8850aa30..a499fb58d858 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -521,8 +521,12 @@ struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx) | |||
521 | 521 | ||
522 | static void __put_nfs_open_context(struct nfs_open_context *ctx, int wait) | 522 | static void __put_nfs_open_context(struct nfs_open_context *ctx, int wait) |
523 | { | 523 | { |
524 | struct inode *inode = ctx->path.dentry->d_inode; | 524 | struct inode *inode; |
525 | 525 | ||
526 | if (ctx == NULL) | ||
527 | return; | ||
528 | |||
529 | inode = ctx->path.dentry->d_inode; | ||
526 | if (!atomic_dec_and_lock(&ctx->count, &inode->i_lock)) | 530 | if (!atomic_dec_and_lock(&ctx->count, &inode->i_lock)) |
527 | return; | 531 | return; |
528 | list_del(&ctx->list); | 532 | list_del(&ctx->list); |