diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-03-30 15:17:51 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-04-18 16:23:12 +0200 |
commit | 001e8e8df4283dd4ef7a0297c012fce364c05cf1 (patch) | |
tree | 28942d4cadc3da175a352c9804dad502d2bc4336 /fs/gfs2/glops.c | |
parent | GFS2: directly write blocks past i_size (diff) | |
download | linux-001e8e8df4283dd4ef7a0297c012fce364c05cf1.tar.xz linux-001e8e8df4283dd4ef7a0297c012fce364c05cf1.zip |
GFS2: Don't try to deallocate unlinked inodes when mounted ro
This adds a couple of missing tests to avoid read-only nodes
from attempting to deallocate unlinked inodes.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reported-by: Michel Andre de la Porte <madelaporte@ubi.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 3754e3cbf02b..25eeb2bcee47 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -385,6 +385,10 @@ static int trans_go_demote_ok(const struct gfs2_glock *gl) static void iopen_go_callback(struct gfs2_glock *gl) { struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object; + struct gfs2_sbd *sdp = gl->gl_sbd; + + if (sdp->sd_vfs->s_flags & MS_RDONLY) + return; if (gl->gl_demote_state == LM_ST_UNLOCKED && gl->gl_state == LM_ST_SHARED && ip) { |