Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262119
b: refs/heads/master
c: ce723c3
h: refs/heads/master
i:
  262117: 3434803
  262115: abc7baa
  262111: 7eeb14a
v: v3
  • Loading branch information
Yongqiang Yang authored and Theodore Ts'o committed Jul 27, 2011
1 parent 2fd598e commit 4db07ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f82f840ec6ab873f520364d443ff6fa1b3f8e22
refs/heads/master: ce723c31b58f54fb865036805475ee7a8c5dc173
10 changes: 10 additions & 0 deletions trunk/fs/ext4/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ int ext4_resize_begin(struct super_block *sb)
if (!capable(CAP_SYS_RESOURCE))
return -EPERM;

/*
* We are not allowed to do online-resizing on a filesystem mounted
* with error, because it can destroy the filesystem easily.
*/
if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
ext4_warning(sb, "There are errors in the filesystem, "
"so online resizing is not allowed\n");
return -EPERM;
}

if (test_and_set_bit_lock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags))
ret = -EBUSY;

Expand Down

0 comments on commit 4db07ab

Please sign in to comment.