aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 15:29:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 15:33:01 -0400
commite1c502482853f84606928f5a2f2eb6da1993cda1 (patch)
treeca296007164906342a195bdf3a5305277e6af5da /fs/reiserfs/super.c
parent019abbc87025a030fd25008612afd4eff8a375f7 (diff)
parentee93961be1faddf9e9a638bc519145c20f0cfeba (diff)
Merge branch 'reiserfs-updates' from Jeff Mahoney
* reiserfs-updates: (35 commits) reiserfs: rename [cn]_* variables reiserfs: rename p_._ variables reiserfs: rename p_s_tb to tb reiserfs: rename p_s_inode to inode reiserfs: rename p_s_bh to bh reiserfs: rename p_s_sb to sb reiserfs: strip trailing whitespace reiserfs: cleanup path functions reiserfs: factor out buffer_info initialization reiserfs: add atomic addition of selinux attributes during inode creation reiserfs: use generic readdir for operations across all xattrs reiserfs: journaled xattrs reiserfs: use generic xattr handlers reiserfs: remove i_has_xattr_dir reiserfs: make per-inode xattr locking more fine grained reiserfs: eliminate per-super xattr lock reiserfs: simplify xattr internal file lookups/opens reiserfs: Clean up xattrs when REISERFS_FS_XATTR is unset reiserfs: remove IS_PRIVATE helpers reiserfs: remove link detection code ... Fixed up conflicts manually due to: - quota name cleanups vs variable naming changes: fs/reiserfs/inode.c fs/reiserfs/namei.c fs/reiserfs/stree.c fs/reiserfs/xattr.c - exported include header cleanups include/linux/reiserfs_fs.h
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c303
1 files changed, 155 insertions, 148 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 5dbafb739401..972250c62896 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -183,9 +183,9 @@ static int finish_unfinished(struct super_block *s)
183 if (REISERFS_SB(s)->s_qf_names[i]) { 183 if (REISERFS_SB(s)->s_qf_names[i]) {
184 int ret = reiserfs_quota_on_mount(s, i); 184 int ret = reiserfs_quota_on_mount(s, i);
185 if (ret < 0) 185 if (ret < 0)
186 reiserfs_warning(s, 186 reiserfs_warning(s, "reiserfs-2500",
187 "reiserfs: cannot turn on journaled quota: error %d", 187 "cannot turn on journaled "
188 ret); 188 "quota: error %d", ret);
189 } 189 }
190 } 190 }
191#endif 191#endif
@@ -195,17 +195,16 @@ static int finish_unfinished(struct super_block *s)
195 while (!retval) { 195 while (!retval) {
196 retval = search_item(s, &max_cpu_key, &path); 196 retval = search_item(s, &max_cpu_key, &path);
197 if (retval != ITEM_NOT_FOUND) { 197 if (retval != ITEM_NOT_FOUND) {
198 reiserfs_warning(s, 198 reiserfs_error(s, "vs-2140",
199 "vs-2140: finish_unfinished: search_by_key returned %d", 199 "search_by_key returned %d", retval);
200 retval);
201 break; 200 break;
202 } 201 }
203 202
204 bh = get_last_bh(&path); 203 bh = get_last_bh(&path);
205 item_pos = get_item_pos(&path); 204 item_pos = get_item_pos(&path);
206 if (item_pos != B_NR_ITEMS(bh)) { 205 if (item_pos != B_NR_ITEMS(bh)) {
207 reiserfs_warning(s, 206 reiserfs_warning(s, "vs-2060",
208 "vs-2060: finish_unfinished: wrong position found"); 207 "wrong position found");
209 break; 208 break;
210 } 209 }
211 item_pos--; 210 item_pos--;
@@ -235,8 +234,7 @@ static int finish_unfinished(struct super_block *s)
235 if (!inode) { 234 if (!inode) {
236 /* the unlink almost completed, it just did not manage to remove 235 /* the unlink almost completed, it just did not manage to remove
237 "save" link and release objectid */ 236 "save" link and release objectid */
238 reiserfs_warning(s, 237 reiserfs_warning(s, "vs-2180", "iget failed for %K",
239 "vs-2180: finish_unfinished: iget failed for %K",
240 &obj_key); 238 &obj_key);
241 retval = remove_save_link_only(s, &save_link_key, 1); 239 retval = remove_save_link_only(s, &save_link_key, 1);
242 continue; 240 continue;
@@ -244,8 +242,8 @@ static int finish_unfinished(struct super_block *s)
244 242
245 if (!truncate && inode->i_nlink) { 243 if (!truncate && inode->i_nlink) {
246 /* file is not unlinked */ 244 /* file is not unlinked */
247 reiserfs_warning(s, 245 reiserfs_warning(s, "vs-2185",
248 "vs-2185: finish_unfinished: file %K is not unlinked", 246 "file %K is not unlinked",
249 &obj_key); 247 &obj_key);
250 retval = remove_save_link_only(s, &save_link_key, 0); 248 retval = remove_save_link_only(s, &save_link_key, 0);
251 continue; 249 continue;
@@ -257,8 +255,9 @@ static int finish_unfinished(struct super_block *s)
257 The only imaginable way is to execute unfinished truncate request 255 The only imaginable way is to execute unfinished truncate request
258 then boot into old kernel, remove the file and create dir with 256 then boot into old kernel, remove the file and create dir with
259 the same key. */ 257 the same key. */
260 reiserfs_warning(s, 258 reiserfs_warning(s, "green-2101",
261 "green-2101: impossible truncate on a directory %k. Please report", 259 "impossible truncate on a "
260 "directory %k. Please report",
262 INODE_PKEY(inode)); 261 INODE_PKEY(inode));
263 retval = remove_save_link_only(s, &save_link_key, 0); 262 retval = remove_save_link_only(s, &save_link_key, 0);
264 truncate = 0; 263 truncate = 0;
@@ -288,9 +287,10 @@ static int finish_unfinished(struct super_block *s)
288 /* removal gets completed in iput */ 287 /* removal gets completed in iput */
289 retval = 0; 288 retval = 0;
290 } else { 289 } else {
291 reiserfs_warning(s, "Dead loop in " 290 reiserfs_warning(s, "super-2189", "Dead loop "
292 "finish_unfinished detected, " 291 "in finish_unfinished "
293 "just remove save link\n"); 292 "detected, just remove "
293 "save link\n");
294 retval = remove_save_link_only(s, 294 retval = remove_save_link_only(s,
295 &save_link_key, 0); 295 &save_link_key, 0);
296 } 296 }
@@ -360,8 +360,9 @@ void add_save_link(struct reiserfs_transaction_handle *th,
360 } else { 360 } else {
361 /* truncate */ 361 /* truncate */
362 if (S_ISDIR(inode->i_mode)) 362 if (S_ISDIR(inode->i_mode))
363 reiserfs_warning(inode->i_sb, 363 reiserfs_warning(inode->i_sb, "green-2102",
364 "green-2102: Adding a truncate savelink for a directory %k! Please report", 364 "Adding a truncate savelink for "
365 "a directory %k! Please report",
365 INODE_PKEY(inode)); 366 INODE_PKEY(inode));
366 set_cpu_key_k_offset(&key, 1); 367 set_cpu_key_k_offset(&key, 1);
367 set_cpu_key_k_type(&key, TYPE_INDIRECT); 368 set_cpu_key_k_type(&key, TYPE_INDIRECT);
@@ -376,9 +377,9 @@ void add_save_link(struct reiserfs_transaction_handle *th,
376 retval = search_item(inode->i_sb, &key, &path); 377 retval = search_item(inode->i_sb, &key, &path);
377 if (retval != ITEM_NOT_FOUND) { 378 if (retval != ITEM_NOT_FOUND) {
378 if (retval != -ENOSPC) 379 if (retval != -ENOSPC)
379 reiserfs_warning(inode->i_sb, "vs-2100: add_save_link:" 380 reiserfs_error(inode->i_sb, "vs-2100",
380 "search_by_key (%K) returned %d", &key, 381 "search_by_key (%K) returned %d", &key,
381 retval); 382 retval);
382 pathrelse(&path); 383 pathrelse(&path);
383 return; 384 return;
384 } 385 }
@@ -391,9 +392,8 @@ void add_save_link(struct reiserfs_transaction_handle *th,
391 reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link); 392 reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link);
392 if (retval) { 393 if (retval) {
393 if (retval != -ENOSPC) 394 if (retval != -ENOSPC)
394 reiserfs_warning(inode->i_sb, 395 reiserfs_error(inode->i_sb, "vs-2120",
395 "vs-2120: add_save_link: insert_item returned %d", 396 "insert_item returned %d", retval);
396 retval);
397 } else { 397 } else {
398 if (truncate) 398 if (truncate)
399 REISERFS_I(inode)->i_flags |= 399 REISERFS_I(inode)->i_flags |=
@@ -492,8 +492,7 @@ static void reiserfs_put_super(struct super_block *s)
492 print_statistics(s); 492 print_statistics(s);
493 493
494 if (REISERFS_SB(s)->reserved_blocks != 0) { 494 if (REISERFS_SB(s)->reserved_blocks != 0) {
495 reiserfs_warning(s, 495 reiserfs_warning(s, "green-2005", "reserved blocks left %d",
496 "green-2005: reiserfs_put_super: reserved blocks left %d",
497 REISERFS_SB(s)->reserved_blocks); 496 REISERFS_SB(s)->reserved_blocks);
498 } 497 }
499 498
@@ -559,8 +558,8 @@ static void reiserfs_dirty_inode(struct inode *inode)
559 558
560 int err = 0; 559 int err = 0;
561 if (inode->i_sb->s_flags & MS_RDONLY) { 560 if (inode->i_sb->s_flags & MS_RDONLY) {
562 reiserfs_warning(inode->i_sb, 561 reiserfs_warning(inode->i_sb, "clm-6006",
563 "clm-6006: writing inode %lu on readonly FS", 562 "writing inode %lu on readonly FS",
564 inode->i_ino); 563 inode->i_ino);
565 return; 564 return;
566 } 565 }
@@ -757,7 +756,7 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
757 char **opt_arg, unsigned long *bit_flags) 756 char **opt_arg, unsigned long *bit_flags)
758{ 757{
759 char *p; 758 char *p;
760 /* foo=bar, 759 /* foo=bar,
761 ^ ^ ^ 760 ^ ^ ^
762 | | +-- option_end 761 | | +-- option_end
763 | +-- arg_start 762 | +-- arg_start
@@ -792,13 +791,15 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
792 if (bit_flags) { 791 if (bit_flags) {
793 if (opt->clrmask == 792 if (opt->clrmask ==
794 (1 << REISERFS_UNSUPPORTED_OPT)) 793 (1 << REISERFS_UNSUPPORTED_OPT))
795 reiserfs_warning(s, "%s not supported.", 794 reiserfs_warning(s, "super-6500",
795 "%s not supported.\n",
796 p); 796 p);
797 else 797 else
798 *bit_flags &= ~opt->clrmask; 798 *bit_flags &= ~opt->clrmask;
799 if (opt->setmask == 799 if (opt->setmask ==
800 (1 << REISERFS_UNSUPPORTED_OPT)) 800 (1 << REISERFS_UNSUPPORTED_OPT))
801 reiserfs_warning(s, "%s not supported.", 801 reiserfs_warning(s, "super-6501",
802 "%s not supported.\n",
802 p); 803 p);
803 else 804 else
804 *bit_flags |= opt->setmask; 805 *bit_flags |= opt->setmask;
@@ -807,7 +808,8 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
807 } 808 }
808 } 809 }
809 if (!opt->option_name) { 810 if (!opt->option_name) {
810 reiserfs_warning(s, "unknown mount option \"%s\"", p); 811 reiserfs_warning(s, "super-6502",
812 "unknown mount option \"%s\"", p);
811 return -1; 813 return -1;
812 } 814 }
813 815
@@ -815,8 +817,9 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
815 switch (*p) { 817 switch (*p) {
816 case '=': 818 case '=':
817 if (!opt->arg_required) { 819 if (!opt->arg_required) {
818 reiserfs_warning(s, 820 reiserfs_warning(s, "super-6503",
819 "the option \"%s\" does not require an argument", 821 "the option \"%s\" does not "
822 "require an argument\n",
820 opt->option_name); 823 opt->option_name);
821 return -1; 824 return -1;
822 } 825 }
@@ -824,14 +827,15 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
824 827
825 case 0: 828 case 0:
826 if (opt->arg_required) { 829 if (opt->arg_required) {
827 reiserfs_warning(s, 830 reiserfs_warning(s, "super-6504",
828 "the option \"%s\" requires an argument", 831 "the option \"%s\" requires an "
829 opt->option_name); 832 "argument\n", opt->option_name);
830 return -1; 833 return -1;
831 } 834 }
832 break; 835 break;
833 default: 836 default:
834 reiserfs_warning(s, "head of option \"%s\" is only correct", 837 reiserfs_warning(s, "super-6505",
838 "head of option \"%s\" is only correct\n",
835 opt->option_name); 839 opt->option_name);
836 return -1; 840 return -1;
837 } 841 }
@@ -843,7 +847,8 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
843 && !(opt->arg_required & (1 << REISERFS_OPT_ALLOWEMPTY)) 847 && !(opt->arg_required & (1 << REISERFS_OPT_ALLOWEMPTY))
844 && !strlen(p)) { 848 && !strlen(p)) {
845 /* this catches "option=," if not allowed */ 849 /* this catches "option=," if not allowed */
846 reiserfs_warning(s, "empty argument for \"%s\"", 850 reiserfs_warning(s, "super-6506",
851 "empty argument for \"%s\"\n",
847 opt->option_name); 852 opt->option_name);
848 return -1; 853 return -1;
849 } 854 }
@@ -865,7 +870,8 @@ static int reiserfs_getopt(struct super_block *s, char **cur, opt_desc_t * opts,
865 } 870 }
866 } 871 }
867 872
868 reiserfs_warning(s, "bad value \"%s\" for option \"%s\"", p, 873 reiserfs_warning(s, "super-6506",
874 "bad value \"%s\" for option \"%s\"\n", p,
869 opt->option_name); 875 opt->option_name);
870 return -1; 876 return -1;
871} 877}
@@ -955,9 +961,9 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
955 *blocks = simple_strtoul(arg, &p, 0); 961 *blocks = simple_strtoul(arg, &p, 0);
956 if (*p != '\0') { 962 if (*p != '\0') {
957 /* NNN does not look like a number */ 963 /* NNN does not look like a number */
958 reiserfs_warning(s, 964 reiserfs_warning(s, "super-6507",
959 "reiserfs_parse_options: bad value %s", 965 "bad value %s for "
960 arg); 966 "-oresize\n", arg);
961 return 0; 967 return 0;
962 } 968 }
963 } 969 }
@@ -968,8 +974,8 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
968 unsigned long val = simple_strtoul(arg, &p, 0); 974 unsigned long val = simple_strtoul(arg, &p, 0);
969 /* commit=NNN (time in seconds) */ 975 /* commit=NNN (time in seconds) */
970 if (*p != '\0' || val >= (unsigned int)-1) { 976 if (*p != '\0' || val >= (unsigned int)-1) {
971 reiserfs_warning(s, 977 reiserfs_warning(s, "super-6508",
972 "reiserfs_parse_options: bad value %s", 978 "bad value %s for -ocommit\n",
973 arg); 979 arg);
974 return 0; 980 return 0;
975 } 981 }
@@ -977,16 +983,18 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
977 } 983 }
978 984
979 if (c == 'w') { 985 if (c == 'w') {
980 reiserfs_warning(s, "reiserfs: nolargeio option is no longer supported"); 986 reiserfs_warning(s, "super-6509", "nolargeio option "
987 "is no longer supported");
981 return 0; 988 return 0;
982 } 989 }
983 990
984 if (c == 'j') { 991 if (c == 'j') {
985 if (arg && *arg && jdev_name) { 992 if (arg && *arg && jdev_name) {
986 if (*jdev_name) { //Hm, already assigned? 993 if (*jdev_name) { //Hm, already assigned?
987 reiserfs_warning(s, 994 reiserfs_warning(s, "super-6510",
988 "reiserfs_parse_options: journal device was already specified to be %s", 995 "journal device was "
989 *jdev_name); 996 "already specified to "
997 "be %s", *jdev_name);
990 return 0; 998 return 0;
991 } 999 }
992 *jdev_name = arg; 1000 *jdev_name = arg;
@@ -998,29 +1006,35 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
998 1006
999 if (sb_any_quota_loaded(s) && 1007 if (sb_any_quota_loaded(s) &&
1000 (!*arg != !REISERFS_SB(s)->s_qf_names[qtype])) { 1008 (!*arg != !REISERFS_SB(s)->s_qf_names[qtype])) {
1001 reiserfs_warning(s, 1009 reiserfs_warning(s, "super-6511",
1002 "reiserfs_parse_options: cannot change journaled quota options when quota turned on."); 1010 "cannot change journaled "
1011 "quota options when quota "
1012 "turned on.");
1003 return 0; 1013 return 0;
1004 } 1014 }
1005 if (*arg) { /* Some filename specified? */ 1015 if (*arg) { /* Some filename specified? */
1006 if (REISERFS_SB(s)->s_qf_names[qtype] 1016 if (REISERFS_SB(s)->s_qf_names[qtype]
1007 && strcmp(REISERFS_SB(s)->s_qf_names[qtype], 1017 && strcmp(REISERFS_SB(s)->s_qf_names[qtype],
1008 arg)) { 1018 arg)) {
1009 reiserfs_warning(s, 1019 reiserfs_warning(s, "super-6512",
1010 "reiserfs_parse_options: %s quota file already specified.", 1020 "%s quota file "
1021 "already specified.",
1011 QTYPE2NAME(qtype)); 1022 QTYPE2NAME(qtype));
1012 return 0; 1023 return 0;
1013 } 1024 }
1014 if (strchr(arg, '/')) { 1025 if (strchr(arg, '/')) {
1015 reiserfs_warning(s, 1026 reiserfs_warning(s, "super-6513",
1016 "reiserfs_parse_options: quotafile must be on filesystem root."); 1027 "quotafile must be "
1028 "on filesystem root.");
1017 return 0; 1029 return 0;
1018 } 1030 }
1019 qf_names[qtype] = 1031 qf_names[qtype] =
1020 kmalloc(strlen(arg) + 1, GFP_KERNEL); 1032 kmalloc(strlen(arg) + 1, GFP_KERNEL);
1021 if (!qf_names[qtype]) { 1033 if (!qf_names[qtype]) {
1022 reiserfs_warning(s, 1034 reiserfs_warning(s, "reiserfs-2502",
1023 "reiserfs_parse_options: not enough memory for storing quotafile name."); 1035 "not enough memory "
1036 "for storing "
1037 "quotafile name.");
1024 return 0; 1038 return 0;
1025 } 1039 }
1026 strcpy(qf_names[qtype], arg); 1040 strcpy(qf_names[qtype], arg);
@@ -1038,21 +1052,24 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
1038 else if (!strcmp(arg, "vfsv0")) 1052 else if (!strcmp(arg, "vfsv0"))
1039 *qfmt = QFMT_VFS_V0; 1053 *qfmt = QFMT_VFS_V0;
1040 else { 1054 else {
1041 reiserfs_warning(s, 1055 reiserfs_warning(s, "super-6514",
1042 "reiserfs_parse_options: unknown quota format specified."); 1056 "unknown quota format "
1057 "specified.");
1043 return 0; 1058 return 0;
1044 } 1059 }
1045 if (sb_any_quota_loaded(s) && 1060 if (sb_any_quota_loaded(s) &&
1046 *qfmt != REISERFS_SB(s)->s_jquota_fmt) { 1061 *qfmt != REISERFS_SB(s)->s_jquota_fmt) {
1047 reiserfs_warning(s, 1062 reiserfs_warning(s, "super-6515",
1048 "reiserfs_parse_options: cannot change journaled quota options when quota turned on."); 1063 "cannot change journaled "
1064 "quota options when quota "
1065 "turned on.");
1049 return 0; 1066 return 0;
1050 } 1067 }
1051 } 1068 }
1052#else 1069#else
1053 if (c == 'u' || c == 'g' || c == 'f') { 1070 if (c == 'u' || c == 'g' || c == 'f') {
1054 reiserfs_warning(s, 1071 reiserfs_warning(s, "reiserfs-2503", "journaled "
1055 "reiserfs_parse_options: journaled quota options not supported."); 1072 "quota options not supported.");
1056 return 0; 1073 return 0;
1057 } 1074 }
1058#endif 1075#endif
@@ -1061,15 +1078,15 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
1061#ifdef CONFIG_QUOTA 1078#ifdef CONFIG_QUOTA
1062 if (!REISERFS_SB(s)->s_jquota_fmt && !*qfmt 1079 if (!REISERFS_SB(s)->s_jquota_fmt && !*qfmt
1063 && (qf_names[USRQUOTA] || qf_names[GRPQUOTA])) { 1080 && (qf_names[USRQUOTA] || qf_names[GRPQUOTA])) {
1064 reiserfs_warning(s, 1081 reiserfs_warning(s, "super-6515",
1065 "reiserfs_parse_options: journaled quota format not specified."); 1082 "journaled quota format not specified.");
1066 return 0; 1083 return 0;
1067 } 1084 }
1068 /* This checking is not precise wrt the quota type but for our purposes it is sufficient */ 1085 /* This checking is not precise wrt the quota type but for our purposes it is sufficient */
1069 if (!(*mount_options & (1 << REISERFS_QUOTA)) 1086 if (!(*mount_options & (1 << REISERFS_QUOTA))
1070 && sb_any_quota_loaded(s)) { 1087 && sb_any_quota_loaded(s)) {
1071 reiserfs_warning(s, 1088 reiserfs_warning(s, "super-6516", "quota options must "
1072 "reiserfs_parse_options: quota options must be present when quota is turned on."); 1089 "be present when quota is turned on.");
1073 return 0; 1090 return 0;
1074 } 1091 }
1075#endif 1092#endif
@@ -1129,14 +1146,15 @@ static void handle_attrs(struct super_block *s)
1129 1146
1130 if (reiserfs_attrs(s)) { 1147 if (reiserfs_attrs(s)) {
1131 if (old_format_only(s)) { 1148 if (old_format_only(s)) {
1132 reiserfs_warning(s, 1149 reiserfs_warning(s, "super-6517", "cannot support "
1133 "reiserfs: cannot support attributes on 3.5.x disk format"); 1150 "attributes on 3.5.x disk format");
1134 REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); 1151 REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
1135 return; 1152 return;
1136 } 1153 }
1137 if (!(le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared)) { 1154 if (!(le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared)) {
1138 reiserfs_warning(s, 1155 reiserfs_warning(s, "super-6518", "cannot support "
1139 "reiserfs: cannot support attributes until flag is set in super-block"); 1156 "attributes until flag is set in "
1157 "super-block");
1140 REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); 1158 REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
1141 } 1159 }
1142 } 1160 }
@@ -1278,6 +1296,8 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1278 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); 1296 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs);
1279 s->s_flags &= ~MS_RDONLY; 1297 s->s_flags &= ~MS_RDONLY;
1280 set_sb_umount_state(rs, REISERFS_ERROR_FS); 1298 set_sb_umount_state(rs, REISERFS_ERROR_FS);
1299 if (!old_format_only(s))
1300 set_sb_mnt_count(rs, sb_mnt_count(rs) + 1);
1281 /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */ 1301 /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */
1282 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); 1302 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
1283 REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS; 1303 REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS;
@@ -1312,7 +1332,7 @@ static int read_super_block(struct super_block *s, int offset)
1312 1332
1313 bh = sb_bread(s, offset / s->s_blocksize); 1333 bh = sb_bread(s, offset / s->s_blocksize);
1314 if (!bh) { 1334 if (!bh) {
1315 reiserfs_warning(s, "sh-2006: read_super_block: " 1335 reiserfs_warning(s, "sh-2006",
1316 "bread failed (dev %s, block %lu, size %lu)", 1336 "bread failed (dev %s, block %lu, size %lu)",
1317 reiserfs_bdevname(s), offset / s->s_blocksize, 1337 reiserfs_bdevname(s), offset / s->s_blocksize,
1318 s->s_blocksize); 1338 s->s_blocksize);
@@ -1326,15 +1346,15 @@ static int read_super_block(struct super_block *s, int offset)
1326 } 1346 }
1327 // 1347 //
1328 // ok, reiserfs signature (old or new) found in at the given offset 1348 // ok, reiserfs signature (old or new) found in at the given offset
1329 // 1349 //
1330 fs_blocksize = sb_blocksize(rs); 1350 fs_blocksize = sb_blocksize(rs);
1331 brelse(bh); 1351 brelse(bh);
1332 sb_set_blocksize(s, fs_blocksize); 1352 sb_set_blocksize(s, fs_blocksize);
1333 1353
1334 bh = sb_bread(s, offset / s->s_blocksize); 1354 bh = sb_bread(s, offset / s->s_blocksize);
1335 if (!bh) { 1355 if (!bh) {
1336 reiserfs_warning(s, "sh-2007: read_super_block: " 1356 reiserfs_warning(s, "sh-2007",
1337 "bread failed (dev %s, block %lu, size %lu)\n", 1357 "bread failed (dev %s, block %lu, size %lu)",
1338 reiserfs_bdevname(s), offset / s->s_blocksize, 1358 reiserfs_bdevname(s), offset / s->s_blocksize,
1339 s->s_blocksize); 1359 s->s_blocksize);
1340 return 1; 1360 return 1;
@@ -1342,8 +1362,8 @@ static int read_super_block(struct super_block *s, int offset)
1342 1362
1343 rs = (struct reiserfs_super_block *)bh->b_data; 1363 rs = (struct reiserfs_super_block *)bh->b_data;
1344 if (sb_blocksize(rs) != s->s_blocksize) { 1364 if (sb_blocksize(rs) != s->s_blocksize) {
1345 reiserfs_warning(s, "sh-2011: read_super_block: " 1365 reiserfs_warning(s, "sh-2011", "can't find a reiserfs "
1346 "can't find a reiserfs filesystem on (dev %s, block %Lu, size %lu)\n", 1366 "filesystem on (dev %s, block %Lu, size %lu)",
1347 reiserfs_bdevname(s), 1367 reiserfs_bdevname(s),
1348 (unsigned long long)bh->b_blocknr, 1368 (unsigned long long)bh->b_blocknr,
1349 s->s_blocksize); 1369 s->s_blocksize);
@@ -1353,9 +1373,10 @@ static int read_super_block(struct super_block *s, int offset)
1353 1373
1354 if (rs->s_v1.s_root_block == cpu_to_le32(-1)) { 1374 if (rs->s_v1.s_root_block == cpu_to_le32(-1)) {
1355 brelse(bh); 1375 brelse(bh);
1356 reiserfs_warning(s, 1376 reiserfs_warning(s, "super-6519", "Unfinished reiserfsck "
1357 "Unfinished reiserfsck --rebuild-tree run detected. Please run\n" 1377 "--rebuild-tree run detected. Please run\n"
1358 "reiserfsck --rebuild-tree and wait for a completion. If that fails\n" 1378 "reiserfsck --rebuild-tree and wait for a "
1379 "completion. If that fails\n"
1359 "get newer reiserfsprogs package"); 1380 "get newer reiserfsprogs package");
1360 return 1; 1381 return 1;
1361 } 1382 }
@@ -1367,18 +1388,15 @@ static int read_super_block(struct super_block *s, int offset)
1367 /* magic is of non-standard journal filesystem, look at s_version to 1388 /* magic is of non-standard journal filesystem, look at s_version to
1368 find which format is in use */ 1389 find which format is in use */
1369 if (sb_version(rs) == REISERFS_VERSION_2) 1390 if (sb_version(rs) == REISERFS_VERSION_2)
1370 reiserfs_warning(s, 1391 reiserfs_info(s, "found reiserfs format \"3.6\""
1371 "read_super_block: found reiserfs format \"3.6\"" 1392 " with non-standard journal\n");
1372 " with non-standard journal");
1373 else if (sb_version(rs) == REISERFS_VERSION_1) 1393 else if (sb_version(rs) == REISERFS_VERSION_1)
1374 reiserfs_warning(s, 1394 reiserfs_info(s, "found reiserfs format \"3.5\""
1375 "read_super_block: found reiserfs format \"3.5\"" 1395 " with non-standard journal\n");
1376 " with non-standard journal");
1377 else { 1396 else {
1378 reiserfs_warning(s, 1397 reiserfs_warning(s, "sh-2012", "found unknown "
1379 "sh-2012: read_super_block: found unknown " 1398 "format \"%u\" of reiserfs with "
1380 "format \"%u\" of reiserfs with non-standard magic", 1399 "non-standard magic", sb_version(rs));
1381 sb_version(rs));
1382 return 1; 1400 return 1;
1383 } 1401 }
1384 } else 1402 } else
@@ -1408,8 +1426,7 @@ static int reread_meta_blocks(struct super_block *s)
1408 ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s))); 1426 ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s)));
1409 wait_on_buffer(SB_BUFFER_WITH_SB(s)); 1427 wait_on_buffer(SB_BUFFER_WITH_SB(s));
1410 if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { 1428 if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) {
1411 reiserfs_warning(s, 1429 reiserfs_warning(s, "reiserfs-2504", "error reading the super");
1412 "reread_meta_blocks, error reading the super");
1413 return 1; 1430 return 1;
1414 } 1431 }
1415 1432
@@ -1452,8 +1469,8 @@ static __u32 find_hash_out(struct super_block *s)
1452 if (reiserfs_rupasov_hash(s)) { 1469 if (reiserfs_rupasov_hash(s)) {
1453 hash = YURA_HASH; 1470 hash = YURA_HASH;
1454 } 1471 }
1455 reiserfs_warning(s, "FS seems to be empty, autodetect " 1472 reiserfs_info(s, "FS seems to be empty, autodetect "
1456 "is using the default hash"); 1473 "is using the default hash\n");
1457 break; 1474 break;
1458 } 1475 }
1459 r5hash = GET_HASH_VALUE(r5_hash(de.de_name, de.de_namelen)); 1476 r5hash = GET_HASH_VALUE(r5_hash(de.de_name, de.de_namelen));
@@ -1473,10 +1490,10 @@ static __u32 find_hash_out(struct super_block *s)
1473 && (yurahash == 1490 && (yurahash ==
1474 GET_HASH_VALUE(deh_offset 1491 GET_HASH_VALUE(deh_offset
1475 (&(de.de_deh[de.de_entry_num])))))) { 1492 (&(de.de_deh[de.de_entry_num])))))) {
1476 reiserfs_warning(s, 1493 reiserfs_warning(s, "reiserfs-2506", "Unable to "
1477 "Unable to automatically detect hash function. " 1494 "automatically detect hash function. "
1478 "Please mount with -o hash={tea,rupasov,r5}", 1495 "Please mount with -o "
1479 reiserfs_bdevname(s)); 1496 "hash={tea,rupasov,r5}");
1480 hash = UNSET_HASH; 1497 hash = UNSET_HASH;
1481 break; 1498 break;
1482 } 1499 }
@@ -1490,7 +1507,8 @@ static __u32 find_hash_out(struct super_block *s)
1490 (deh_offset(&(de.de_deh[de.de_entry_num]))) == r5hash) 1507 (deh_offset(&(de.de_deh[de.de_entry_num]))) == r5hash)
1491 hash = R5_HASH; 1508 hash = R5_HASH;
1492 else { 1509 else {
1493 reiserfs_warning(s, "Unrecognised hash function"); 1510 reiserfs_warning(s, "reiserfs-2506",
1511 "Unrecognised hash function");
1494 hash = UNSET_HASH; 1512 hash = UNSET_HASH;
1495 } 1513 }
1496 } while (0); 1514 } while (0);
@@ -1514,21 +1532,24 @@ static int what_hash(struct super_block *s)
1514 code = find_hash_out(s); 1532 code = find_hash_out(s);
1515 1533
1516 if (code != UNSET_HASH && reiserfs_hash_detect(s)) { 1534 if (code != UNSET_HASH && reiserfs_hash_detect(s)) {
1517 /* detection has found the hash, and we must check against the 1535 /* detection has found the hash, and we must check against the
1518 ** mount options 1536 ** mount options
1519 */ 1537 */
1520 if (reiserfs_rupasov_hash(s) && code != YURA_HASH) { 1538 if (reiserfs_rupasov_hash(s) && code != YURA_HASH) {
1521 reiserfs_warning(s, "Error, %s hash detected, " 1539 reiserfs_warning(s, "reiserfs-2507",
1540 "Error, %s hash detected, "
1522 "unable to force rupasov hash", 1541 "unable to force rupasov hash",
1523 reiserfs_hashname(code)); 1542 reiserfs_hashname(code));
1524 code = UNSET_HASH; 1543 code = UNSET_HASH;
1525 } else if (reiserfs_tea_hash(s) && code != TEA_HASH) { 1544 } else if (reiserfs_tea_hash(s) && code != TEA_HASH) {
1526 reiserfs_warning(s, "Error, %s hash detected, " 1545 reiserfs_warning(s, "reiserfs-2508",
1546 "Error, %s hash detected, "
1527 "unable to force tea hash", 1547 "unable to force tea hash",
1528 reiserfs_hashname(code)); 1548 reiserfs_hashname(code));
1529 code = UNSET_HASH; 1549 code = UNSET_HASH;
1530 } else if (reiserfs_r5_hash(s) && code != R5_HASH) { 1550 } else if (reiserfs_r5_hash(s) && code != R5_HASH) {
1531 reiserfs_warning(s, "Error, %s hash detected, " 1551 reiserfs_warning(s, "reiserfs-2509",
1552 "Error, %s hash detected, "
1532 "unable to force r5 hash", 1553 "unable to force r5 hash",
1533 reiserfs_hashname(code)); 1554 reiserfs_hashname(code));
1534 code = UNSET_HASH; 1555 code = UNSET_HASH;
@@ -1544,7 +1565,7 @@ static int what_hash(struct super_block *s)
1544 } 1565 }
1545 } 1566 }
1546 1567
1547 /* if we are mounted RW, and we have a new valid hash code, update 1568 /* if we are mounted RW, and we have a new valid hash code, update
1548 ** the super 1569 ** the super
1549 */ 1570 */
1550 if (code != UNSET_HASH && 1571 if (code != UNSET_HASH &&
@@ -1587,9 +1608,9 @@ static int function2code(hashf_t func)
1587 return 0; 1608 return 0;
1588} 1609}
1589 1610
1590#define SWARN(silent, s, ...) \ 1611#define SWARN(silent, s, id, ...) \
1591 if (!(silent)) \ 1612 if (!(silent)) \
1592 reiserfs_warning (s, __VA_ARGS__) 1613 reiserfs_warning(s, id, __VA_ARGS__)
1593 1614
1594static int reiserfs_fill_super(struct super_block *s, void *data, int silent) 1615static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1595{ 1616{
@@ -1623,10 +1644,6 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1623 REISERFS_SB(s)->s_alloc_options.preallocmin = 0; 1644 REISERFS_SB(s)->s_alloc_options.preallocmin = 0;
1624 /* Preallocate by 16 blocks (17-1) at once */ 1645 /* Preallocate by 16 blocks (17-1) at once */
1625 REISERFS_SB(s)->s_alloc_options.preallocsize = 17; 1646 REISERFS_SB(s)->s_alloc_options.preallocsize = 17;
1626#ifdef CONFIG_REISERFS_FS_XATTR
1627 /* Initialize the rwsem for xattr dir */
1628 init_rwsem(&REISERFS_SB(s)->xattr_dir_sem);
1629#endif
1630 /* setup default block allocator options */ 1647 /* setup default block allocator options */
1631 reiserfs_init_alloc_options(s); 1648 reiserfs_init_alloc_options(s);
1632 1649
@@ -1641,8 +1658,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1641#endif 1658#endif
1642 1659
1643 if (blocks) { 1660 if (blocks) {
1644 SWARN(silent, s, "jmacd-7: reiserfs_fill_super: resize option " 1661 SWARN(silent, s, "jmacd-7", "resize option for remount only");
1645 "for remount only");
1646 goto error; 1662 goto error;
1647 } 1663 }
1648 1664
@@ -1651,8 +1667,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1651 old_format = 1; 1667 old_format = 1;
1652 /* try new format (64-th 1k block), which can contain reiserfs super block */ 1668 /* try new format (64-th 1k block), which can contain reiserfs super block */
1653 else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) { 1669 else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) {
1654 SWARN(silent, s, 1670 SWARN(silent, s, "sh-2021", "can not find reiserfs on %s",
1655 "sh-2021: reiserfs_fill_super: can not find reiserfs on %s",
1656 reiserfs_bdevname(s)); 1671 reiserfs_bdevname(s));
1657 goto error; 1672 goto error;
1658 } 1673 }
@@ -1664,13 +1679,12 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1664 if (s->s_bdev && s->s_bdev->bd_inode 1679 if (s->s_bdev && s->s_bdev->bd_inode
1665 && i_size_read(s->s_bdev->bd_inode) < 1680 && i_size_read(s->s_bdev->bd_inode) <
1666 sb_block_count(rs) * sb_blocksize(rs)) { 1681 sb_block_count(rs) * sb_blocksize(rs)) {
1667 SWARN(silent, s, 1682 SWARN(silent, s, "", "Filesystem cannot be "
1668 "Filesystem on %s cannot be mounted because it is bigger than the device", 1683 "mounted because it is bigger than the device");
1669 reiserfs_bdevname(s)); 1684 SWARN(silent, s, "", "You may need to run fsck "
1670 SWARN(silent, s, 1685 "or increase size of your LVM partition");
1671 "You may need to run fsck or increase size of your LVM partition"); 1686 SWARN(silent, s, "", "Or may be you forgot to "
1672 SWARN(silent, s, 1687 "reboot after fdisk when it told you to");
1673 "Or may be you forgot to reboot after fdisk when it told you to");
1674 goto error; 1688 goto error;
1675 } 1689 }
1676 1690
@@ -1678,14 +1692,13 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1678 sbi->s_mount_state = REISERFS_VALID_FS; 1692 sbi->s_mount_state = REISERFS_VALID_FS;
1679 1693
1680 if ((errval = reiserfs_init_bitmap_cache(s))) { 1694 if ((errval = reiserfs_init_bitmap_cache(s))) {
1681 SWARN(silent, s, 1695 SWARN(silent, s, "jmacd-8", "unable to read bitmap");
1682 "jmacd-8: reiserfs_fill_super: unable to read bitmap");
1683 goto error; 1696 goto error;
1684 } 1697 }
1685 errval = -EINVAL; 1698 errval = -EINVAL;
1686#ifdef CONFIG_REISERFS_CHECK 1699#ifdef CONFIG_REISERFS_CHECK
1687 SWARN(silent, s, "CONFIG_REISERFS_CHECK is set ON"); 1700 SWARN(silent, s, "", "CONFIG_REISERFS_CHECK is set ON");
1688 SWARN(silent, s, "- it is slow mode for debugging."); 1701 SWARN(silent, s, "", "- it is slow mode for debugging.");
1689#endif 1702#endif
1690 1703
1691 /* make data=ordered the default */ 1704 /* make data=ordered the default */
@@ -1706,8 +1719,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1706 } 1719 }
1707 // set_device_ro(s->s_dev, 1) ; 1720 // set_device_ro(s->s_dev, 1) ;
1708 if (journal_init(s, jdev_name, old_format, commit_max_age)) { 1721 if (journal_init(s, jdev_name, old_format, commit_max_age)) {
1709 SWARN(silent, s, 1722 SWARN(silent, s, "sh-2022",
1710 "sh-2022: reiserfs_fill_super: unable to initialize journal space"); 1723 "unable to initialize journal space");
1711 goto error; 1724 goto error;
1712 } else { 1725 } else {
1713 jinit_done = 1; /* once this is set, journal_release must be called 1726 jinit_done = 1; /* once this is set, journal_release must be called
@@ -1715,8 +1728,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1715 */ 1728 */
1716 } 1729 }
1717 if (reread_meta_blocks(s)) { 1730 if (reread_meta_blocks(s)) {
1718 SWARN(silent, s, 1731 SWARN(silent, s, "jmacd-9",
1719 "jmacd-9: reiserfs_fill_super: unable to reread meta blocks after journal init"); 1732 "unable to reread meta blocks after journal init");
1720 goto error; 1733 goto error;
1721 } 1734 }
1722 1735
@@ -1724,8 +1737,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1724 goto error; 1737 goto error;
1725 1738
1726 if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) { 1739 if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
1727 SWARN(silent, s, 1740 SWARN(silent, s, "clm-7000",
1728 "clm-7000: Detected readonly device, marking FS readonly"); 1741 "Detected readonly device, marking FS readonly");
1729 s->s_flags |= MS_RDONLY; 1742 s->s_flags |= MS_RDONLY;
1730 } 1743 }
1731 args.objectid = REISERFS_ROOT_OBJECTID; 1744 args.objectid = REISERFS_ROOT_OBJECTID;
@@ -1734,8 +1747,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1734 iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor, 1747 iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor,
1735 reiserfs_init_locked_inode, (void *)(&args)); 1748 reiserfs_init_locked_inode, (void *)(&args));
1736 if (!root_inode) { 1749 if (!root_inode) {
1737 SWARN(silent, s, 1750 SWARN(silent, s, "jmacd-10", "get root inode failed");
1738 "jmacd-10: reiserfs_fill_super: get root inode failed");
1739 goto error; 1751 goto error;
1740 } 1752 }
1741 1753
@@ -1784,7 +1796,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1784 * avoiding corruption. -jeffm */ 1796 * avoiding corruption. -jeffm */
1785 if (bmap_would_wrap(reiserfs_bmap_count(s)) && 1797 if (bmap_would_wrap(reiserfs_bmap_count(s)) &&
1786 sb_bmap_nr(rs) != 0) { 1798 sb_bmap_nr(rs) != 0) {
1787 reiserfs_warning(s, "super-2030: This file system " 1799 reiserfs_warning(s, "super-2030", "This file system "
1788 "claims to use %u bitmap blocks in " 1800 "claims to use %u bitmap blocks in "
1789 "its super block, but requires %u. " 1801 "its super block, but requires %u. "
1790 "Clearing to zero.", sb_bmap_nr(rs), 1802 "Clearing to zero.", sb_bmap_nr(rs),
@@ -1817,7 +1829,9 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1817 } else if (!silent) { 1829 } else if (!silent) {
1818 reiserfs_info(s, "using 3.5.x disk format\n"); 1830 reiserfs_info(s, "using 3.5.x disk format\n");
1819 } 1831 }
1820 } 1832 } else
1833 set_sb_mnt_count(rs, sb_mnt_count(rs) + 1);
1834
1821 1835
1822 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); 1836 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
1823 errval = journal_end(&th, s, 1); 1837 errval = journal_end(&th, s, 1);
@@ -2031,8 +2045,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2031 if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) { 2045 if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) {
2032 err = reiserfs_unpack(inode, NULL); 2046 err = reiserfs_unpack(inode, NULL);
2033 if (err) { 2047 if (err) {
2034 reiserfs_warning(sb, 2048 reiserfs_warning(sb, "super-6520",
2035 "reiserfs: Unpacking tail of quota file failed" 2049 "Unpacking tail of quota file failed"
2036 " (%d). Cannot turn on quotas.", err); 2050 " (%d). Cannot turn on quotas.", err);
2037 err = -EINVAL; 2051 err = -EINVAL;
2038 goto out; 2052 goto out;
@@ -2043,8 +2057,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2043 if (REISERFS_SB(sb)->s_qf_names[type]) { 2057 if (REISERFS_SB(sb)->s_qf_names[type]) {
2044 /* Quotafile not of fs root? */ 2058 /* Quotafile not of fs root? */
2045 if (path.dentry->d_parent != sb->s_root) 2059 if (path.dentry->d_parent != sb->s_root)
2046 reiserfs_warning(sb, 2060 reiserfs_warning(sb, "super-6521",
2047 "reiserfs: Quota file not on filesystem root. " 2061 "Quota file not on filesystem root. "
2048 "Journalled quota will not work."); 2062 "Journalled quota will not work.");
2049 } 2063 }
2050 2064
@@ -2195,9 +2209,6 @@ static int __init init_reiserfs_fs(void)
2195 return ret; 2209 return ret;
2196 } 2210 }
2197 2211
2198 if ((ret = reiserfs_xattr_register_handlers()))
2199 goto failed_reiserfs_xattr_register_handlers;
2200
2201 reiserfs_proc_info_global_init(); 2212 reiserfs_proc_info_global_init();
2202 reiserfs_proc_register_global("version", 2213 reiserfs_proc_register_global("version",
2203 reiserfs_global_version_in_proc); 2214 reiserfs_global_version_in_proc);
@@ -2208,9 +2219,6 @@ static int __init init_reiserfs_fs(void)
2208 return 0; 2219 return 0;
2209 } 2220 }
2210 2221
2211 reiserfs_xattr_unregister_handlers();
2212
2213 failed_reiserfs_xattr_register_handlers:
2214 reiserfs_proc_unregister_global("version"); 2222 reiserfs_proc_unregister_global("version");
2215 reiserfs_proc_info_global_done(); 2223 reiserfs_proc_info_global_done();
2216 destroy_inodecache(); 2224 destroy_inodecache();
@@ -2220,7 +2228,6 @@ static int __init init_reiserfs_fs(void)
2220 2228
2221static void __exit exit_reiserfs_fs(void) 2229static void __exit exit_reiserfs_fs(void)
2222{ 2230{
2223 reiserfs_xattr_unregister_handlers();
2224 reiserfs_proc_unregister_global("version"); 2231 reiserfs_proc_unregister_global("version");
2225 reiserfs_proc_info_global_done(); 2232 reiserfs_proc_info_global_done();
2226 unregister_filesystem(&reiserfs_fs_type); 2233 unregister_filesystem(&reiserfs_fs_type);