aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/pnfs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 2c59da5511d..d7a8f03e729 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1067,8 +1067,10 @@ pnfs_update_layout(struct inode *ino,
1067 1067
1068 spin_lock(&ino->i_lock); 1068 spin_lock(&ino->i_lock);
1069 lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags); 1069 lo = pnfs_find_alloc_layout(ino, ctx, gfp_flags);
1070 if (lo == NULL) 1070 if (lo == NULL) {
1071 goto out_unlock; 1071 spin_unlock(&ino->i_lock);
1072 goto out;
1073 }
1072 1074
1073 /* Do we even need to bother with this? */ 1075 /* Do we even need to bother with this? */
1074 if (test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags)) { 1076 if (test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags)) {
@@ -1122,6 +1124,7 @@ pnfs_update_layout(struct inode *ino,
1122 spin_unlock(&clp->cl_lock); 1124 spin_unlock(&clp->cl_lock);
1123 } 1125 }
1124 atomic_dec(&lo->plh_outstanding); 1126 atomic_dec(&lo->plh_outstanding);
1127out_put_layout_hdr:
1125 pnfs_put_layout_hdr(lo); 1128 pnfs_put_layout_hdr(lo);
1126out: 1129out:
1127 dprintk("%s: inode %s/%llu pNFS layout segment %s for " 1130 dprintk("%s: inode %s/%llu pNFS layout segment %s for "
@@ -1135,7 +1138,7 @@ out:
1135 return lseg; 1138 return lseg;
1136out_unlock: 1139out_unlock:
1137 spin_unlock(&ino->i_lock); 1140 spin_unlock(&ino->i_lock);
1138 goto out; 1141 goto out_put_layout_hdr;
1139} 1142}
1140EXPORT_SYMBOL_GPL(pnfs_update_layout); 1143EXPORT_SYMBOL_GPL(pnfs_update_layout);
1141 1144