diff options
| -rw-r--r-- | fs/ext2/inode.c | 4 | ||||
| -rw-r--r-- | fs/quota/dquot.c | 37 | ||||
| -rw-r--r-- | fs/quota/quota_v1.c | 2 | ||||
| -rw-r--r-- | fs/quota/quota_v2.c | 2 | ||||
| -rw-r--r-- | fs/reiserfs/journal.c | 2 | ||||
| -rw-r--r-- | fs/udf/namei.c | 15 | ||||
| -rw-r--r-- | fs/udf/super.c | 5 |
7 files changed, 31 insertions, 36 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c27c27300d95..e474127dd255 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
| @@ -451,7 +451,9 @@ failed_out: | |||
| 451 | /** | 451 | /** |
| 452 | * ext2_alloc_branch - allocate and set up a chain of blocks. | 452 | * ext2_alloc_branch - allocate and set up a chain of blocks. |
| 453 | * @inode: owner | 453 | * @inode: owner |
| 454 | * @num: depth of the chain (number of blocks to allocate) | 454 | * @indirect_blks: depth of the chain (number of blocks to allocate) |
| 455 | * @blks: number of allocated direct blocks | ||
| 456 | * @goal: preferred place for allocation | ||
| 455 | * @offsets: offsets (in the blocks) to store the pointers to next. | 457 | * @offsets: offsets (in the blocks) to store the pointers to next. |
| 456 | * @branch: place to store the chain in. | 458 | * @branch: place to store the chain in. |
| 457 | * | 459 | * |
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index fc20e06c56ba..9ad72ea7f71f 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * on the Melbourne quota system as used on BSD derived systems. The internal | 9 | * on the Melbourne quota system as used on BSD derived systems. The internal |
| 10 | * implementation is based on one of the several variants of the LINUX | 10 | * implementation is based on one of the several variants of the LINUX |
| 11 | * inode-subsystem with added complexity of the diskquota system. | 11 | * inode-subsystem with added complexity of the diskquota system. |
| 12 | * | 12 | * |
| 13 | * Author: Marco van Wieringen <mvw@planets.elm.net> | 13 | * Author: Marco van Wieringen <mvw@planets.elm.net> |
| 14 | * | 14 | * |
| 15 | * Fixes: Dmitry Gorodchanin <pgmdsg@ibi.com>, 11 Feb 96 | 15 | * Fixes: Dmitry Gorodchanin <pgmdsg@ibi.com>, 11 Feb 96 |
| @@ -51,7 +51,7 @@ | |||
| 51 | * Added journalled quota support, fix lock inversion problems | 51 | * Added journalled quota support, fix lock inversion problems |
| 52 | * Jan Kara, <jack@suse.cz>, 2003,2004 | 52 | * Jan Kara, <jack@suse.cz>, 2003,2004 |
| 53 | * | 53 | * |
| 54 | * (C) Copyright 1994 - 1997 Marco van Wieringen | 54 | * (C) Copyright 1994 - 1997 Marco van Wieringen |
| 55 | */ | 55 | */ |
| 56 | 56 | ||
| 57 | #include <linux/errno.h> | 57 | #include <linux/errno.h> |
| @@ -197,7 +197,7 @@ static struct quota_format_type *find_quota_format(int id) | |||
| 197 | int qm; | 197 | int qm; |
| 198 | 198 | ||
| 199 | spin_unlock(&dq_list_lock); | 199 | spin_unlock(&dq_list_lock); |
| 200 | 200 | ||
| 201 | for (qm = 0; module_names[qm].qm_fmt_id && | 201 | for (qm = 0; module_names[qm].qm_fmt_id && |
| 202 | module_names[qm].qm_fmt_id != id; qm++) | 202 | module_names[qm].qm_fmt_id != id; qm++) |
| 203 | ; | 203 | ; |
| @@ -424,10 +424,11 @@ int dquot_acquire(struct dquot *dquot) | |||
| 424 | struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); | 424 | struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); |
| 425 | 425 | ||
| 426 | mutex_lock(&dquot->dq_lock); | 426 | mutex_lock(&dquot->dq_lock); |
| 427 | if (!test_bit(DQ_READ_B, &dquot->dq_flags)) | 427 | if (!test_bit(DQ_READ_B, &dquot->dq_flags)) { |
| 428 | ret = dqopt->ops[dquot->dq_id.type]->read_dqblk(dquot); | 428 | ret = dqopt->ops[dquot->dq_id.type]->read_dqblk(dquot); |
| 429 | if (ret < 0) | 429 | if (ret < 0) |
| 430 | goto out_iolock; | 430 | goto out_iolock; |
| 431 | } | ||
| 431 | /* Make sure flags update is visible after dquot has been filled */ | 432 | /* Make sure flags update is visible after dquot has been filled */ |
| 432 | smp_mb__before_atomic(); | 433 | smp_mb__before_atomic(); |
| 433 | set_bit(DQ_READ_B, &dquot->dq_flags); | 434 | set_bit(DQ_READ_B, &dquot->dq_flags); |
| @@ -1049,7 +1050,9 @@ static void remove_dquot_ref(struct super_block *sb, int type, | |||
| 1049 | struct list_head *tofree_head) | 1050 | struct list_head *tofree_head) |
| 1050 | { | 1051 | { |
| 1051 | struct inode *inode; | 1052 | struct inode *inode; |
| 1053 | #ifdef CONFIG_QUOTA_DEBUG | ||
| 1052 | int reserved = 0; | 1054 | int reserved = 0; |
| 1055 | #endif | ||
| 1053 | 1056 | ||
| 1054 | spin_lock(&sb->s_inode_list_lock); | 1057 | spin_lock(&sb->s_inode_list_lock); |
| 1055 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { | 1058 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { |
| @@ -1061,8 +1064,10 @@ static void remove_dquot_ref(struct super_block *sb, int type, | |||
| 1061 | */ | 1064 | */ |
| 1062 | spin_lock(&dq_data_lock); | 1065 | spin_lock(&dq_data_lock); |
| 1063 | if (!IS_NOQUOTA(inode)) { | 1066 | if (!IS_NOQUOTA(inode)) { |
| 1067 | #ifdef CONFIG_QUOTA_DEBUG | ||
| 1064 | if (unlikely(inode_get_rsv_space(inode) > 0)) | 1068 | if (unlikely(inode_get_rsv_space(inode) > 0)) |
| 1065 | reserved = 1; | 1069 | reserved = 1; |
| 1070 | #endif | ||
| 1066 | remove_inode_dquot_ref(inode, type, tofree_head); | 1071 | remove_inode_dquot_ref(inode, type, tofree_head); |
| 1067 | } | 1072 | } |
| 1068 | spin_unlock(&dq_data_lock); | 1073 | spin_unlock(&dq_data_lock); |
| @@ -1663,7 +1668,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags) | |||
| 1663 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 1668 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { |
| 1664 | if (!dquots[cnt]) | 1669 | if (!dquots[cnt]) |
| 1665 | continue; | 1670 | continue; |
| 1666 | if (flags & DQUOT_SPACE_RESERVE) { | 1671 | if (reserve) { |
| 1667 | ret = dquot_add_space(dquots[cnt], 0, number, flags, | 1672 | ret = dquot_add_space(dquots[cnt], 0, number, flags, |
| 1668 | &warn[cnt]); | 1673 | &warn[cnt]); |
| 1669 | } else { | 1674 | } else { |
| @@ -1676,13 +1681,11 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags) | |||
| 1676 | if (!dquots[cnt]) | 1681 | if (!dquots[cnt]) |
| 1677 | continue; | 1682 | continue; |
| 1678 | spin_lock(&dquots[cnt]->dq_dqb_lock); | 1683 | spin_lock(&dquots[cnt]->dq_dqb_lock); |
| 1679 | if (flags & DQUOT_SPACE_RESERVE) { | 1684 | if (reserve) |
| 1680 | dquots[cnt]->dq_dqb.dqb_rsvspace -= | 1685 | dquot_free_reserved_space(dquots[cnt], |
| 1681 | number; | 1686 | number); |
| 1682 | } else { | 1687 | else |
| 1683 | dquots[cnt]->dq_dqb.dqb_curspace -= | 1688 | dquot_decr_space(dquots[cnt], number); |
| 1684 | number; | ||
| 1685 | } | ||
| 1686 | spin_unlock(&dquots[cnt]->dq_dqb_lock); | 1689 | spin_unlock(&dquots[cnt]->dq_dqb_lock); |
| 1687 | } | 1690 | } |
| 1688 | spin_unlock(&inode->i_lock); | 1691 | spin_unlock(&inode->i_lock); |
| @@ -1733,7 +1736,7 @@ int dquot_alloc_inode(struct inode *inode) | |||
| 1733 | continue; | 1736 | continue; |
| 1734 | /* Back out changes we already did */ | 1737 | /* Back out changes we already did */ |
| 1735 | spin_lock(&dquots[cnt]->dq_dqb_lock); | 1738 | spin_lock(&dquots[cnt]->dq_dqb_lock); |
| 1736 | dquots[cnt]->dq_dqb.dqb_curinodes--; | 1739 | dquot_decr_inodes(dquots[cnt], 1); |
| 1737 | spin_unlock(&dquots[cnt]->dq_dqb_lock); | 1740 | spin_unlock(&dquots[cnt]->dq_dqb_lock); |
| 1738 | } | 1741 | } |
| 1739 | goto warn_put_all; | 1742 | goto warn_put_all; |
| @@ -2397,7 +2400,7 @@ out_file_flags: | |||
| 2397 | out_fmt: | 2400 | out_fmt: |
| 2398 | put_quota_format(fmt); | 2401 | put_quota_format(fmt); |
| 2399 | 2402 | ||
| 2400 | return error; | 2403 | return error; |
| 2401 | } | 2404 | } |
| 2402 | 2405 | ||
| 2403 | /* Reenable quotas on remount RW */ | 2406 | /* Reenable quotas on remount RW */ |
| @@ -2775,7 +2778,7 @@ int dquot_get_state(struct super_block *sb, struct qc_state *state) | |||
| 2775 | struct qc_type_state *tstate; | 2778 | struct qc_type_state *tstate; |
| 2776 | struct quota_info *dqopt = sb_dqopt(sb); | 2779 | struct quota_info *dqopt = sb_dqopt(sb); |
| 2777 | int type; | 2780 | int type; |
| 2778 | 2781 | ||
| 2779 | memset(state, 0, sizeof(*state)); | 2782 | memset(state, 0, sizeof(*state)); |
| 2780 | for (type = 0; type < MAXQUOTAS; type++) { | 2783 | for (type = 0; type < MAXQUOTAS; type++) { |
| 2781 | if (!sb_has_quota_active(sb, type)) | 2784 | if (!sb_has_quota_active(sb, type)) |
diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c index 7ac5298aba70..9f2b2573b83c 100644 --- a/fs/quota/quota_v1.c +++ b/fs/quota/quota_v1.c | |||
| @@ -127,7 +127,7 @@ static int v1_check_quota_file(struct super_block *sb, int type) | |||
| 127 | { | 127 | { |
| 128 | struct inode *inode = sb_dqopt(sb)->files[type]; | 128 | struct inode *inode = sb_dqopt(sb)->files[type]; |
| 129 | ulong blocks; | 129 | ulong blocks; |
| 130 | size_t off; | 130 | size_t off; |
| 131 | struct v2_disk_dqheader dqhead; | 131 | struct v2_disk_dqheader dqhead; |
| 132 | ssize_t size; | 132 | ssize_t size; |
| 133 | loff_t isize; | 133 | loff_t isize; |
diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c index a73e5b34db41..3c30034e733f 100644 --- a/fs/quota/quota_v2.c +++ b/fs/quota/quota_v2.c | |||
| @@ -78,7 +78,7 @@ static int v2_check_quota_file(struct super_block *sb, int type) | |||
| 78 | struct v2_disk_dqheader dqhead; | 78 | struct v2_disk_dqheader dqhead; |
| 79 | static const uint quota_magics[] = V2_INITQMAGICS; | 79 | static const uint quota_magics[] = V2_INITQMAGICS; |
| 80 | static const uint quota_versions[] = V2_INITQVERSIONS; | 80 | static const uint quota_versions[] = V2_INITQVERSIONS; |
| 81 | 81 | ||
| 82 | if (v2_read_header(sb, type, &dqhead)) | 82 | if (v2_read_header(sb, type, &dqhead)) |
| 83 | return 0; | 83 | return 0; |
| 84 | if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || | 84 | if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 8a76f9d14bc6..36346dc4cec0 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
| @@ -1844,7 +1844,7 @@ static int flush_used_journal_lists(struct super_block *s, | |||
| 1844 | * removes any nodes in table with name block and dev as bh. | 1844 | * removes any nodes in table with name block and dev as bh. |
| 1845 | * only touchs the hnext and hprev pointers. | 1845 | * only touchs the hnext and hprev pointers. |
| 1846 | */ | 1846 | */ |
| 1847 | void remove_journal_hash(struct super_block *sb, | 1847 | static void remove_journal_hash(struct super_block *sb, |
| 1848 | struct reiserfs_journal_cnode **table, | 1848 | struct reiserfs_journal_cnode **table, |
| 1849 | struct reiserfs_journal_list *jl, | 1849 | struct reiserfs_journal_list *jl, |
| 1850 | unsigned long block, int remove_freed) | 1850 | unsigned long block, int remove_freed) |
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 58cc2414992b..77b6d89b9bcd 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
| @@ -304,21 +304,6 @@ static struct dentry *udf_lookup(struct inode *dir, struct dentry *dentry, | |||
| 304 | if (dentry->d_name.len > UDF_NAME_LEN) | 304 | if (dentry->d_name.len > UDF_NAME_LEN) |
| 305 | return ERR_PTR(-ENAMETOOLONG); | 305 | return ERR_PTR(-ENAMETOOLONG); |
| 306 | 306 | ||
| 307 | #ifdef UDF_RECOVERY | ||
| 308 | /* temporary shorthand for specifying files by inode number */ | ||
| 309 | if (!strncmp(dentry->d_name.name, ".B=", 3)) { | ||
| 310 | struct kernel_lb_addr lb = { | ||
| 311 | .logicalBlockNum = 0, | ||
| 312 | .partitionReferenceNum = | ||
| 313 | simple_strtoul(dentry->d_name.name + 3, | ||
| 314 | NULL, 0), | ||
| 315 | }; | ||
| 316 | inode = udf_iget(dir->i_sb, lb); | ||
| 317 | if (IS_ERR(inode)) | ||
| 318 | return inode; | ||
| 319 | } else | ||
| 320 | #endif /* UDF_RECOVERY */ | ||
| 321 | |||
| 322 | fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); | 307 | fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); |
| 323 | if (IS_ERR(fi)) | 308 | if (IS_ERR(fi)) |
| 324 | return ERR_CAST(fi); | 309 | return ERR_CAST(fi); |
diff --git a/fs/udf/super.c b/fs/udf/super.c index f64691f2168a..a14346137361 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
| @@ -566,6 +566,11 @@ static int udf_parse_options(char *options, struct udf_options *uopt, | |||
| 566 | if (!remount) { | 566 | if (!remount) { |
| 567 | if (uopt->nls_map) | 567 | if (uopt->nls_map) |
| 568 | unload_nls(uopt->nls_map); | 568 | unload_nls(uopt->nls_map); |
| 569 | /* | ||
| 570 | * load_nls() failure is handled later in | ||
| 571 | * udf_fill_super() after all options are | ||
| 572 | * parsed. | ||
| 573 | */ | ||
| 569 | uopt->nls_map = load_nls(args[0].from); | 574 | uopt->nls_map = load_nls(args[0].from); |
| 570 | uopt->flags |= (1 << UDF_FLAG_NLS_MAP); | 575 | uopt->flags |= (1 << UDF_FLAG_NLS_MAP); |
| 571 | } | 576 | } |
