diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-14 15:11:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-14 15:11:28 -0400 |
commit | 40e4591d949469d089714518385e4a99071a1762 (patch) | |
tree | e81c3e27c27ab8affc3b3f890c85ffbff57dd9e6 | |
parent | aea8b5d1e5c5482e7cdda849dc16d728f7080289 (diff) | |
parent | c288d2969627be7ffc90904ac8c6aae0295fbf9f (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, ext3, reiserfs, quota fixes from Jan Kara:
"A fix for regression in ext2, and a format string issue in ext3. The
rest isn't too serious."
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
ext2: Fix BUG_ON in evict() on inode deletion
reiserfs: Use kstrdup instead of kmalloc/strcpy
ext3: Fix format string issues
quota: add missing use of dq_data_lock in __dquot_initialize
-rw-r--r-- | fs/ext2/ialloc.c | 1 | ||||
-rw-r--r-- | fs/ext2/inode.c | 2 | ||||
-rw-r--r-- | fs/ext3/super.c | 4 | ||||
-rw-r--r-- | fs/quota/dquot.c | 5 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 4 |
5 files changed, 9 insertions, 7 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index 8f370e012e61..7cadd823bb31 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c | |||
@@ -118,7 +118,6 @@ void ext2_free_inode (struct inode * inode) | |||
118 | * as writing the quota to disk may need the lock as well. | 118 | * as writing the quota to disk may need the lock as well. |
119 | */ | 119 | */ |
120 | /* Quota is already initialized in iput() */ | 120 | /* Quota is already initialized in iput() */ |
121 | ext2_xattr_delete_inode(inode); | ||
122 | dquot_free_inode(inode); | 121 | dquot_free_inode(inode); |
123 | dquot_drop(inode); | 122 | dquot_drop(inode); |
124 | 123 | ||
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c3881e56662e..fe60cc1117d8 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "ext2.h" | 34 | #include "ext2.h" |
35 | #include "acl.h" | 35 | #include "acl.h" |
36 | #include "xip.h" | 36 | #include "xip.h" |
37 | #include "xattr.h" | ||
37 | 38 | ||
38 | static int __ext2_write_inode(struct inode *inode, int do_sync); | 39 | static int __ext2_write_inode(struct inode *inode, int do_sync); |
39 | 40 | ||
@@ -88,6 +89,7 @@ void ext2_evict_inode(struct inode * inode) | |||
88 | inode->i_size = 0; | 89 | inode->i_size = 0; |
89 | if (inode->i_blocks) | 90 | if (inode->i_blocks) |
90 | ext2_truncate_blocks(inode, 0); | 91 | ext2_truncate_blocks(inode, 0); |
92 | ext2_xattr_delete_inode(inode); | ||
91 | } | 93 | } |
92 | 94 | ||
93 | invalidate_inode_buffers(inode); | 95 | invalidate_inode_buffers(inode); |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 1d6e2ed85322..fb5120a5505c 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -353,7 +353,7 @@ static struct block_device *ext3_blkdev_get(dev_t dev, struct super_block *sb) | |||
353 | return bdev; | 353 | return bdev; |
354 | 354 | ||
355 | fail: | 355 | fail: |
356 | ext3_msg(sb, "error: failed to open journal device %s: %ld", | 356 | ext3_msg(sb, KERN_ERR, "error: failed to open journal device %s: %ld", |
357 | __bdevname(dev, b), PTR_ERR(bdev)); | 357 | __bdevname(dev, b), PTR_ERR(bdev)); |
358 | 358 | ||
359 | return NULL; | 359 | return NULL; |
@@ -887,7 +887,7 @@ static ext3_fsblk_t get_sb_block(void **data, struct super_block *sb) | |||
887 | /*todo: use simple_strtoll with >32bit ext3 */ | 887 | /*todo: use simple_strtoll with >32bit ext3 */ |
888 | sb_block = simple_strtoul(options, &options, 0); | 888 | sb_block = simple_strtoul(options, &options, 0); |
889 | if (*options && *options != ',') { | 889 | if (*options && *options != ',') { |
890 | ext3_msg(sb, "error: invalid sb specification: %s", | 890 | ext3_msg(sb, KERN_ERR, "error: invalid sb specification: %s", |
891 | (char *) *data); | 891 | (char *) *data); |
892 | return 1; | 892 | return 1; |
893 | } | 893 | } |
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 05ae3c97f7a5..3e64169ef527 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -1439,8 +1439,11 @@ static void __dquot_initialize(struct inode *inode, int type) | |||
1439 | * did a write before quota was turned on | 1439 | * did a write before quota was turned on |
1440 | */ | 1440 | */ |
1441 | rsv = inode_get_rsv_space(inode); | 1441 | rsv = inode_get_rsv_space(inode); |
1442 | if (unlikely(rsv)) | 1442 | if (unlikely(rsv)) { |
1443 | spin_lock(&dq_data_lock); | ||
1443 | dquot_resv_space(inode->i_dquot[cnt], rsv); | 1444 | dquot_resv_space(inode->i_dquot[cnt], rsv); |
1445 | spin_unlock(&dq_data_lock); | ||
1446 | } | ||
1444 | } | 1447 | } |
1445 | } | 1448 | } |
1446 | out_err: | 1449 | out_err: |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 194113b1b11b..f8a23c3078f8 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1147,8 +1147,7 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin | |||
1147 | "on filesystem root."); | 1147 | "on filesystem root."); |
1148 | return 0; | 1148 | return 0; |
1149 | } | 1149 | } |
1150 | qf_names[qtype] = | 1150 | qf_names[qtype] = kstrdup(arg, GFP_KERNEL); |
1151 | kmalloc(strlen(arg) + 1, GFP_KERNEL); | ||
1152 | if (!qf_names[qtype]) { | 1151 | if (!qf_names[qtype]) { |
1153 | reiserfs_warning(s, "reiserfs-2502", | 1152 | reiserfs_warning(s, "reiserfs-2502", |
1154 | "not enough memory " | 1153 | "not enough memory " |
@@ -1156,7 +1155,6 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin | |||
1156 | "quotafile name."); | 1155 | "quotafile name."); |
1157 | return 0; | 1156 | return 0; |
1158 | } | 1157 | } |
1159 | strcpy(qf_names[qtype], arg); | ||
1160 | if (qtype == USRQUOTA) | 1158 | if (qtype == USRQUOTA) |
1161 | *mount_options |= 1 << REISERFS_USRQUOTA; | 1159 | *mount_options |= 1 << REISERFS_USRQUOTA; |
1162 | else | 1160 | else |