diff options
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 1a349f9a9685..5d4261ff5d23 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -2100,8 +2100,13 @@ int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name, | |||
2100 | } | 2100 | } |
2101 | if (IS_ERR(dent)) | 2101 | if (IS_ERR(dent)) |
2102 | return PTR_ERR(dent); | 2102 | return PTR_ERR(dent); |
2103 | da->bh = bh; | 2103 | |
2104 | da->dent = dent; | 2104 | if (da->save_loc) { |
2105 | da->bh = bh; | ||
2106 | da->dent = dent; | ||
2107 | } else { | ||
2108 | brelse(bh); | ||
2109 | } | ||
2105 | return 0; | 2110 | return 0; |
2106 | } | 2111 | } |
2107 | 2112 | ||