diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-01-08 03:14:30 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-01-25 03:17:31 -0500 |
commit | 9656b2c14c6ee0806c90a6be41dec71117fc8f50 (patch) | |
tree | 3e093571e695bf780885f36caec9594392da31fc /fs/gfs2/ops_inode.c | |
parent | 0811a127cb83ad2e0355e5e3e30164d7ef0f2d65 (diff) |
[GFS2] Fix problems relating to execution of files on GFS2
This patch fixes a couple of problems which affected the execution of files
on GFS2. The first is that there was a corner case where inodes were not
always uptodate at the point at which permissions checks were being carried
out, this was resulting in refusal of execute permission, but only on the
first lookup, subsequent requests worked correctly. The second was a problem
relating to incorrect updating of file sizes which was introduced with the
write_begin/end code for GFS2 a little while back.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Abhijith Das <adas@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 291f0c7eaa3b..8386ab323e33 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -113,8 +113,18 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
113 | if (inode && IS_ERR(inode)) | 113 | if (inode && IS_ERR(inode)) |
114 | return ERR_PTR(PTR_ERR(inode)); | 114 | return ERR_PTR(PTR_ERR(inode)); |
115 | 115 | ||
116 | if (inode) | 116 | if (inode) { |
117 | struct gfs2_glock *gl = GFS2_I(inode)->i_gl; | ||
118 | struct gfs2_holder gh; | ||
119 | int error; | ||
120 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); | ||
121 | if (error) { | ||
122 | iput(inode); | ||
123 | return ERR_PTR(error); | ||
124 | } | ||
125 | gfs2_glock_dq_uninit(&gh); | ||
117 | return d_splice_alias(inode, dentry); | 126 | return d_splice_alias(inode, dentry); |
127 | } | ||
118 | d_add(dentry, inode); | 128 | d_add(dentry, inode); |
119 | 129 | ||
120 | return NULL; | 130 | return NULL; |