Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43272
b: refs/heads/master
c: bfded27
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Nov 30, 2006
1 parent 6d5fa83 commit 93af14c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9583c7983cbba9726bfe64ee46613d654fc9e26
refs/heads/master: bfded27ba010d1c3b0aa3843f97dc9b80de751be
5 changes: 3 additions & 2 deletions trunk/fs/gfs2/glops.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,9 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
int data = (flags & DIO_DATA);

if (meta) {
struct gfs2_inode *ip = gl->gl_object;
gfs2_meta_inval(gl);
gl->gl_vn++;
set_bit(GIF_INVALID, &ip->i_flags);
}
if (data)
gfs2_page_inval(gl);
Expand Down Expand Up @@ -351,7 +352,7 @@ static int inode_go_lock(struct gfs2_holder *gh)
if (!ip)
return 0;

if (ip->i_vn != gl->gl_vn) {
if (test_bit(GIF_INVALID, &ip->i_flags)) {
error = gfs2_inode_refresh(ip);
if (error)
return error;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ struct gfs2_alloc {
};

enum {
GIF_INVALID = 0,
GIF_QD_LOCKED = 1,
GIF_PAGED = 2,
GIF_SW_PAGED = 3,
Expand All @@ -228,7 +229,6 @@ struct gfs2_inode {

unsigned long i_flags; /* GIF_... */

u64 i_vn;
struct gfs2_dinode_host i_di; /* To be replaced by ref to block */

struct gfs2_glock *i_gl; /* Move into i_gh? */
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum_host *i
if (unlikely(error))
goto fail_put;

ip->i_vn = ip->i_gl->gl_vn - 1;
set_bit(GIF_INVALID, &ip->i_flags);
error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh);
if (unlikely(error))
goto fail_iopen;
Expand Down Expand Up @@ -242,7 +242,7 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)

error = gfs2_dinode_in(ip, dibh->b_data);
brelse(dibh);
ip->i_vn = ip->i_gl->gl_vn;
clear_bit(GIF_INVALID, &ip->i_flags);

return error;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/ops_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd)
struct gfs2_holder i_gh;
int error;

if (ip->i_vn == ip->i_gl->gl_vn)
if (!test_bit(GIF_INVALID, &ip->i_flags))
return generic_permission(inode, mask, gfs2_check_acl);

error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
Expand Down

0 comments on commit 93af14c

Please sign in to comment.