projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[GFS2] Remove useless i_cache from inodes
[powerpc.git]
/
fs
/
gfs2
/
inode.c
diff --git
a/fs/gfs2/inode.c
b/fs/gfs2/inode.c
index
5f6dc32
..
af493fc
100644
(file)
--- a/
fs/gfs2/inode.c
+++ b/
fs/gfs2/inode.c
@@
-31,7
+31,6
@@
#include "log.h"
#include "meta_io.h"
#include "ops_address.h"
#include "log.h"
#include "meta_io.h"
#include "ops_address.h"
-#include "ops_file.h"
#include "ops_inode.h"
#include "quota.h"
#include "rgrp.h"
#include "ops_inode.h"
#include "quota.h"
#include "rgrp.h"
@@
-294,11
+293,6
@@
static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
return 0;
}
return 0;
}
-static void gfs2_inode_bh(struct gfs2_inode *ip, struct buffer_head *bh)
-{
- ip->i_cache[0] = bh;
-}
-
/**
* gfs2_inode_refresh - Refresh the incore copy of the dinode
* @ip: The GFS2 inode
/**
* gfs2_inode_refresh - Refresh the incore copy of the dinode
* @ip: The GFS2 inode
@@
-966,7
+960,7
@@
struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
struct gfs2_inum_host inum = { .no_addr = 0, .no_formal_ino = 0 };
int error;
u64 generation;
struct gfs2_inum_host inum = { .no_addr = 0, .no_formal_ino = 0 };
int error;
u64 generation;
- struct buffer_head *bh
=
NULL;
+ struct buffer_head *bh
=
NULL;
if (!name->len || name->len > GFS2_FNAMESIZE)
return ERR_PTR(-ENAMETOOLONG);
if (!name->len || name->len > GFS2_FNAMESIZE)
return ERR_PTR(-ENAMETOOLONG);
@@
-1003,8
+997,6
@@
struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
if (IS_ERR(inode))
goto fail_gunlock2;
if (IS_ERR(inode))
goto fail_gunlock2;
- gfs2_inode_bh(GFS2_I(inode), bh);
-
error = gfs2_inode_refresh(GFS2_I(inode));
if (error)
goto fail_gunlock2;
error = gfs2_inode_refresh(GFS2_I(inode));
if (error)
goto fail_gunlock2;
@@
-1021,6
+1013,8
@@
struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
if (error)
goto fail_gunlock2;
if (error)
goto fail_gunlock2;
+ if (bh)
+ brelse(bh);
if (!inode)
return ERR_PTR(-ENOMEM);
return inode;
if (!inode)
return ERR_PTR(-ENOMEM);
return inode;
@@
-1032,6
+1026,8
@@
fail_gunlock2:
fail_gunlock:
gfs2_glock_dq(ghs);
fail:
fail_gunlock:
gfs2_glock_dq(ghs);
fail:
+ if (bh)
+ brelse(bh);
return ERR_PTR(error);
}
return ERR_PTR(error);
}