Pull ext2, udf, reiserfs, quota cleanups and minor fixes from Jan Kara: "A few ext2 fixups and then several (mostly comment and documentation) cleanups in ext2, udf, reiserfs, and quota" * tag 'for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: delete duplicated words udf: osta_udf.h: delete a duplicated word reiserfs: reiserfs.h: delete a duplicated word ext2: ext2.h: fix duplicated word + typos udf: Replace HTTP links with HTTPS ones quota: Fixup http links in quota doc Replace HTTP links with HTTPS ones: DISKQUOTA ext2: initialize quota info in ext2_xattr_set() ext2: fix some incorrect comments in inode.c ext2: remove nocheck option ext2: fix missing percpu_counter_inc ext2: ext2_find_entry() return -ENOENT if no entry found ext2: propagate errors up to ext2_find_entry()'s callers ext2: fix improper assignment for e_value_offs
Unified · Split
| @@ -18,7 +18,7 @@ Quota limits (and amount of grace time) are set independently for each · 17 unmodified lines | |||
| 18 | filesystem. | 18 | filesystem. |
| 19 | 19 | ||
| 20 | For more details about quota design, see the documentation in quota-tools package | 20 | For more details about quota design, see the documentation in quota-tools package |
| 21 | (http://sourceforge.net/projects/linuxquota). | 21 | (https://sourceforge.net/projects/linuxquota). |
| 22 | 22 | ||
| 23 | Quota netlink interface | 23 | Quota netlink interface |
| 24 | ======================= | 24 | ======================= |
| @@ -31,11 +31,11 @@ the above events to userspace. There they can be captured by an application · 6 unmodified lines | |||
| 31 | and processed accordingly. | 31 | and processed accordingly. |
| 32 | 32 | ||
| 33 | The interface uses generic netlink framework (see | 33 | The interface uses generic netlink framework (see |
| 34 | http://lwn.net/Articles/208755/ and http://people.suug.ch/~tgr/libnl/ for more | 34 | https://lwn.net/Articles/208755/ and http://www.infradead.org/~tgr/libnl/ for |
| 35 | details about this layer). The name of the quota generic netlink interface | 35 | more details about this layer). The name of the quota generic netlink interface |
| 36 | is "VFS_DQUOT". Definitions of constants below are in <linux/quota.h>. | 36 | is "VFS_DQUOT". Definitions of constants below are in <linux/quota.h>. Since |
| 37 | Since the quota netlink protocol is not namespace aware, quota netlink messages | 37 | the quota netlink protocol is not namespace aware, quota netlink messages are |
| 38 | are sent only in initial network namespace. | 38 | sent only in initial network namespace. |
| 39 | 39 | ||
| 40 | Currently, the interface supports only one message type QUOTA_NL_C_WARNING. | 40 | Currently, the interface supports only one message type QUOTA_NL_C_WARNING. |
| 41 | This command is used to send a notification about any of the above mentioned | 41 | This command is used to send a notification about any of the above mentioned |
| @@ -72,4 +72,4 @@ For the latest version and toolset see: · 71 unmodified lines | |||
| 72 | 72 | ||
| 73 | Documentation on UDF and ECMA 167 is available FREE from: | 73 | Documentation on UDF and ECMA 167 is available FREE from: |
| 74 | - http://www.osta.org/ | 74 | - http://www.osta.org/ |
| 75 | - http://www.ecma-international.org/ | 75 | - https://www.ecma-international.org/ |
| @@ -348,7 +348,6 @@ struct ext2_dir_entry_2 *ext2_find_entry (struct inode *dir, · 347 unmodified lines | |||
| 348 | struct page *page = NULL; | 348 | struct page *page = NULL; |
| 349 | struct ext2_inode_info *ei = EXT2_I(dir); | 349 | struct ext2_inode_info *ei = EXT2_I(dir); |
| 350 | ext2_dirent * de; | 350 | ext2_dirent * de; |
| 351 | int dir_has_error = 0; | ||
| 352 | 351 | ||
| 353 | if (npages == 0) | 352 | if (npages == 0) |
| 354 | goto out; | 353 | goto out; |
| @@ -362,25 +361,25 @@ struct ext2_dir_entry_2 *ext2_find_entry (struct inode *dir, · 7 unmodified lines | |||
| 362 | n = start; | 361 | n = start; |
| 363 | do { | 362 | do { |
| 364 | char *kaddr; | 363 | char *kaddr; |
| 365 | page = ext2_get_page(dir, n, dir_has_error); | 364 | page = ext2_get_page(dir, n, 0); |
| 366 | if (!IS_ERR(page)) { | 365 | if (IS_ERR(page)) |
| 367 | kaddr = page_address(page); | 366 | return ERR_CAST(page); |
| 368 | de = (ext2_dirent *) kaddr; | 367 | |
| 369 | kaddr += ext2_last_byte(dir, n) - reclen; | 368 | kaddr = page_address(page); |
| 370 | while ((char *) de <= kaddr) { | 369 | de = (ext2_dirent *) kaddr; |
| 371 | if (de->rec_len == 0) { | 370 | kaddr += ext2_last_byte(dir, n) - reclen; |
| 372 | ext2_error(dir->i_sb, __func__, | 371 | while ((char *) de <= kaddr) { |
| 373 | "zero-length directory entry"); | 372 | if (de->rec_len == 0) { |
| 374 | ext2_put_page(page); | 373 | ext2_error(dir->i_sb, __func__, |
| 375 | goto out; | 374 | "zero-length directory entry"); |
| 376 | } | 375 | ext2_put_page(page); |
| 377 | if (ext2_match (namelen, name, de)) | 376 | goto out; |
| 378 | goto found; | ||
| 379 | de = ext2_next_entry(de); | ||
| 380 | } | 377 | } |
| 381 | ext2_put_page(page); | 378 | if (ext2_match(namelen, name, de)) |
| 382 | } else | 379 | goto found; |
| 383 | dir_has_error = 1; | 380 | de = ext2_next_entry(de); |
| 381 | } | ||
| 382 | ext2_put_page(page); | ||
| 384 | 383 | ||
| 385 | if (++n >= npages) | 384 | if (++n >= npages) |
| 386 | n = 0; | 385 | n = 0; |
| @@ -394,7 +393,7 @@ struct ext2_dir_entry_2 *ext2_find_entry (struct inode *dir, · 7 unmodified lines | |||
| 394 | } | 393 | } |
| 395 | } while (n != start); | 394 | } while (n != start); |
| 396 | out: | 395 | out: |
| 397 | return NULL; | 396 | return ERR_PTR(-ENOENT); |
| 398 | 397 | ||
| 399 | found: | 398 | found: |
| 400 | *res_page = page; | 399 | *res_page = page; |
| @@ -414,18 +413,18 @@ struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p) · 13 unmodified lines | |||
| 414 | return de; | 413 | return de; |
| 415 | } | 414 | } |
| 416 | 415 | ||
| 417 | ino_t ext2_inode_by_name(struct inode *dir, const struct qstr *child) | 416 | int ext2_inode_by_name(struct inode *dir, const struct qstr *child, ino_t *ino) |
| 418 | { | 417 | { |
| 419 | ino_t res = 0; | ||
| 420 | struct ext2_dir_entry_2 *de; | 418 | struct ext2_dir_entry_2 *de; |
| 421 | struct page *page; | 419 | struct page *page; |
| 422 | 420 | ||
| 423 | de = ext2_find_entry (dir, child, &page); | 421 | de = ext2_find_entry(dir, child, &page); |
| 424 | if (de) { | 422 | if (IS_ERR(de)) |
| 425 | res = le32_to_cpu(de->inode); | 423 | return PTR_ERR(de); |
| 426 | ext2_put_page(page); | 424 | |
| 427 | } | 425 | *ino = le32_to_cpu(de->inode); |
| 428 | return res; | 426 | ext2_put_page(page); |
| 427 | return 0; | ||
| 429 | } | 428 | } |
| 430 | 429 | ||
| 431 | static int ext2_prepare_chunk(struct page *page, loff_t pos, unsigned len) | 430 | static int ext2_prepare_chunk(struct page *page, loff_t pos, unsigned len) |
| @@ -52,8 +52,8 @@ struct ext2_block_alloc_info { · 51 unmodified lines | |||
| 52 | /* | 52 | /* |
| 53 | * Was i_next_alloc_goal in ext2_inode_info | 53 | * Was i_next_alloc_goal in ext2_inode_info |
| 54 | * is the *physical* companion to i_next_alloc_block. | 54 | * is the *physical* companion to i_next_alloc_block. |
| 55 | * it the the physical block number of the block which was most-recentl | 55 | * it is the physical block number of the block which was most-recently |
| 56 | * allocated to this file. This give us the goal (target) for the next | 56 | * allocated to this file. This gives us the goal (target) for the next |
| 57 | * allocation when we detect linearly ascending requests. | 57 | * allocation when we detect linearly ascending requests. |
| 58 | */ | 58 | */ |
| 59 | ext2_fsblk_t last_alloc_physical_block; | 59 | ext2_fsblk_t last_alloc_physical_block; |
| @@ -374,7 +374,6 @@ struct ext2_inode { · 314 unmodified lines | |||
| 374 | /* | 374 | /* |
| 375 | * Mount flags | 375 | * Mount flags |
| 376 | */ | 376 | */ |
| 377 | #define EXT2_MOUNT_CHECK 0x000001 /* Do mount-time checks */ | ||
| 378 | #define EXT2_MOUNT_OLDALLOC 0x000002 /* Don't use the new Orlov allocator */ | 377 | #define EXT2_MOUNT_OLDALLOC 0x000002 /* Don't use the new Orlov allocator */ |
| 379 | #define EXT2_MOUNT_GRPID 0x000004 /* Create files with directory's group */ | 378 | #define EXT2_MOUNT_GRPID 0x000004 /* Create files with directory's group */ |
| 380 | #define EXT2_MOUNT_DEBUG 0x000008 /* Some debugging messages */ | 379 | #define EXT2_MOUNT_DEBUG 0x000008 /* Some debugging messages */ |
| @@ -738,7 +737,8 @@ extern void ext2_rsv_window_add(struct super_block *sb, struct ext2_reserve_wind · 357 unmodified lines | |||
| 738 | 737 | ||
| 739 | /* dir.c */ | 738 | /* dir.c */ |
| 740 | extern int ext2_add_link (struct dentry *, struct inode *); | 739 | extern int ext2_add_link (struct dentry *, struct inode *); |
| 741 | extern ino_t ext2_inode_by_name(struct inode *, const struct qstr *); | 740 | extern int ext2_inode_by_name(struct inode *dir, |
| 741 | const struct qstr *child, ino_t *ino); | ||
| 742 | extern int ext2_make_empty(struct inode *, struct inode *); | 742 | extern int ext2_make_empty(struct inode *, struct inode *); |
| 743 | extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,const struct qstr *, struct page **); | 743 | extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,const struct qstr *, struct page **); |
| 744 | extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *); | 744 | extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *); |
| @@ -80,6 +80,7 @@ static void ext2_release_inode(struct super_block *sb, int group, int dir) · 79 unmodified lines | |||
| 80 | if (dir) | 80 | if (dir) |
| 81 | le16_add_cpu(&desc->bg_used_dirs_count, -1); | 81 | le16_add_cpu(&desc->bg_used_dirs_count, -1); |
| 82 | spin_unlock(sb_bgl_lock(EXT2_SB(sb), group)); | 82 | spin_unlock(sb_bgl_lock(EXT2_SB(sb), group)); |
| 83 | percpu_counter_inc(&EXT2_SB(sb)->s_freeinodes_counter); | ||
| 83 | if (dir) | 84 | if (dir) |
| 84 | percpu_counter_dec(&EXT2_SB(sb)->s_dirs_counter); | 85 | percpu_counter_dec(&EXT2_SB(sb)->s_dirs_counter); |
| 85 | mark_buffer_dirty(bh); | 86 | mark_buffer_dirty(bh); |
| @@ -528,7 +529,7 @@ got: · 442 unmodified lines | |||
| 528 | goto fail; | 529 | goto fail; |
| 529 | } | 530 | } |
| 530 | 531 | ||
| 531 | percpu_counter_add(&sbi->s_freeinodes_counter, -1); | 532 | percpu_counter_dec(&sbi->s_freeinodes_counter); |
| 532 | if (S_ISDIR(mode)) | 533 | if (S_ISDIR(mode)) |
| 533 | percpu_counter_inc(&sbi->s_dirs_counter); | 534 | percpu_counter_inc(&sbi->s_dirs_counter); |
| 534 | 535 | ||
| @@ -356,8 +356,7 @@ static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block, · 355 unmodified lines | |||
| 356 | * @blks: number of data blocks to be mapped. | 356 | * @blks: number of data blocks to be mapped. |
| 357 | * @blocks_to_boundary: the offset in the indirect block | 357 | * @blocks_to_boundary: the offset in the indirect block |
| 358 | * | 358 | * |
| 359 | * return the total number of blocks to be allocate, including the | 359 | * return the number of direct blocks to allocate. |
| 360 | * direct and indirect blocks. | ||
| 361 | */ | 360 | */ |
| 362 | static int | 361 | static int |
| 363 | ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks, | 362 | ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks, |
| @@ -390,11 +389,9 @@ ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks, · 26 unmodified lines | |||
| 390 | * ext2_alloc_blocks: multiple allocate blocks needed for a branch | 389 | * ext2_alloc_blocks: multiple allocate blocks needed for a branch |
| 391 | * @indirect_blks: the number of blocks need to allocate for indirect | 390 | * @indirect_blks: the number of blocks need to allocate for indirect |
| 392 | * blocks | 391 | * blocks |
| 393 | * | 392 | * @blks: the number of blocks need to allocate for direct blocks |
| 394 | * @new_blocks: on return it will store the new block numbers for | 393 | * @new_blocks: on return it will store the new block numbers for |
| 395 | * the indirect blocks(if needed) and the first direct block, | 394 | * the indirect blocks(if needed) and the first direct block, |
| 396 | * @blks: on return it will store the total number of allocated | ||
| 397 | * direct blocks | ||
| 398 | */ | 395 | */ |
| 399 | static int ext2_alloc_blocks(struct inode *inode, | 396 | static int ext2_alloc_blocks(struct inode *inode, |
| 400 | ext2_fsblk_t goal, int indirect_blks, int blks, | 397 | ext2_fsblk_t goal, int indirect_blks, int blks, |
| @@ -57,13 +57,17 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, uns · 56 unmodified lines | |||
| 57 | { | 57 | { |
| 58 | struct inode * inode; | 58 | struct inode * inode; |
| 59 | ino_t ino; | 59 | ino_t ino; |
| 60 | int res; | ||
| 60 | 61 | ||
| 61 | if (dentry->d_name.len > EXT2_NAME_LEN) | 62 | if (dentry->d_name.len > EXT2_NAME_LEN) |
| 62 | return ERR_PTR(-ENAMETOOLONG); | 63 | return ERR_PTR(-ENAMETOOLONG); |
| 63 | 64 | ||
| 64 | ino = ext2_inode_by_name(dir, &dentry->d_name); | 65 | res = ext2_inode_by_name(dir, &dentry->d_name, &ino); |
| 65 | inode = NULL; | 66 | if (res) { |
| 66 | if (ino) { | 67 | if (res != -ENOENT) |
| 68 | return ERR_PTR(res); | ||
| 69 | inode = NULL; | ||
| 70 | } else { | ||
| 67 | inode = ext2_iget(dir->i_sb, ino); | 71 | inode = ext2_iget(dir->i_sb, ino); |
| 68 | if (inode == ERR_PTR(-ESTALE)) { | 72 | if (inode == ERR_PTR(-ESTALE)) { |
| 69 | ext2_error(dir->i_sb, __func__, | 73 | ext2_error(dir->i_sb, __func__, |
| @@ -78,9 +82,13 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, uns · 8 unmodified lines | |||
| 78 | struct dentry *ext2_get_parent(struct dentry *child) | 82 | struct dentry *ext2_get_parent(struct dentry *child) |
| 79 | { | 83 | { |
| 80 | struct qstr dotdot = QSTR_INIT("..", 2); | 84 | struct qstr dotdot = QSTR_INIT("..", 2); |
| 81 | unsigned long ino = ext2_inode_by_name(d_inode(child), &dotdot); | 85 | ino_t ino; |
| 82 | if (!ino) | 86 | int res; |
| 83 | return ERR_PTR(-ENOENT); | 87 | |
| 88 | res = ext2_inode_by_name(d_inode(child), &dotdot, &ino); | ||
| 89 | if (res) | ||
| 90 | return ERR_PTR(res); | ||
| 91 | |||
| 84 | return d_obtain_alias(ext2_iget(child->d_sb, ino)); | 92 | return d_obtain_alias(ext2_iget(child->d_sb, ino)); |
| 85 | } | 93 | } |
| 86 | 94 | ||
| @@ -274,9 +282,9 @@ static int ext2_unlink(struct inode * dir, struct dentry *dentry) · 187 unmodified lines | |||
| 274 | if (err) | 282 | if (err) |
| 275 | goto out; | 283 | goto out; |
| 276 | 284 | ||
| 277 | de = ext2_find_entry (dir, &dentry->d_name, &page); | 285 | de = ext2_find_entry(dir, &dentry->d_name, &page); |
| 278 | if (!de) { | 286 | if (IS_ERR(de)) { |
| 279 | err = -ENOENT; | 287 | err = PTR_ERR(de); |
| 280 | goto out; | 288 | goto out; |
| 281 | } | 289 | } |
| 282 | 290 | ||
| @@ -330,9 +338,9 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, · 47 unmodified lines | |||
| 330 | if (err) | 338 | if (err) |
| 331 | goto out; | 339 | goto out; |
| 332 | 340 | ||
| 333 | old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); | 341 | old_de = ext2_find_entry(old_dir, &old_dentry->d_name, &old_page); |
| 334 | if (!old_de) { | 342 | if (IS_ERR(old_de)) { |
| 335 | err = -ENOENT; | 343 | err = PTR_ERR(old_de); |
| 336 | goto out; | 344 | goto out; |
| 337 | } | 345 | } |
| 338 | 346 | ||
| @@ -351,10 +359,11 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, · 12 unmodified lines | |||
| 351 | if (dir_de && !ext2_empty_dir (new_inode)) | 359 | if (dir_de && !ext2_empty_dir (new_inode)) |
| 352 | goto out_dir; | 360 | goto out_dir; |
| 353 | 361 | ||
| 354 | err = -ENOENT; | 362 | new_de = ext2_find_entry(new_dir, &new_dentry->d_name, &new_page); |
| 355 | new_de = ext2_find_entry (new_dir, &new_dentry->d_name, &new_page); | 363 | if (IS_ERR(new_de)) { |
| 356 | if (!new_de) | 364 | err = PTR_ERR(new_de); |
| 357 | goto out_dir; | 365 | goto out_dir; |
| 366 | } | ||
| 358 | ext2_set_link(new_dir, new_de, new_page, old_inode, 1); | 367 | ext2_set_link(new_dir, new_de, new_page, old_inode, 1); |
| 359 | new_inode->i_ctime = current_time(new_inode); | 368 | new_inode->i_ctime = current_time(new_inode); |
| 360 | if (dir_de) | 369 | if (dir_de) |
| @@ -431,7 +431,7 @@ static unsigned long get_sb_block(void **data) · 430 unmodified lines | |||
| 431 | enum { | 431 | enum { |
| 432 | Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid, | 432 | Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid, |
| 433 | Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, | 433 | Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, |
| 434 | Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug, | 434 | Opt_err_ro, Opt_nouid32, Opt_debug, |
| 435 | Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr, | 435 | Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr, |
| 436 | Opt_acl, Opt_noacl, Opt_xip, Opt_dax, Opt_ignore, Opt_err, Opt_quota, | 436 | Opt_acl, Opt_noacl, Opt_xip, Opt_dax, Opt_ignore, Opt_err, Opt_quota, |
| 437 | Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation | 437 | Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation |
| @@ -451,8 +451,6 @@ static const match_table_t tokens = { · 13 unmodified lines | |||
| 451 | {Opt_err_panic, "errors=panic"}, | 451 | {Opt_err_panic, "errors=panic"}, |
| 452 | {Opt_err_ro, "errors=remount-ro"}, | 452 | {Opt_err_ro, "errors=remount-ro"}, |
| 453 | {Opt_nouid32, "nouid32"}, | 453 | {Opt_nouid32, "nouid32"}, |
| 454 | {Opt_nocheck, "check=none"}, | ||
| 455 | {Opt_nocheck, "nocheck"}, | ||
| 456 | {Opt_debug, "debug"}, | 454 | {Opt_debug, "debug"}, |
| 457 | {Opt_oldalloc, "oldalloc"}, | 455 | {Opt_oldalloc, "oldalloc"}, |
| 458 | {Opt_orlov, "orlov"}, | 456 | {Opt_orlov, "orlov"}, |
| @@ -546,12 +544,6 @@ static int parse_options(char *options, struct super_block *sb, · 87 unmodified lines | |||
| 546 | case Opt_nouid32: | 544 | case Opt_nouid32: |
| 547 | set_opt (opts->s_mount_opt, NO_UID32); | 545 | set_opt (opts->s_mount_opt, NO_UID32); |
| 548 | break; | 546 | break; |
| 549 | case Opt_nocheck: | ||
| 550 | ext2_msg(sb, KERN_WARNING, | ||
| 551 | "Option nocheck/check=none is deprecated and" | ||
| 552 | " will be removed in June 2020."); | ||
| 553 | clear_opt (opts->s_mount_opt, CHECK); | ||
| 554 | break; | ||
| 555 | case Opt_debug: | 547 | case Opt_debug: |
| 556 | set_opt (opts->s_mount_opt, DEBUG); | 548 | set_opt (opts->s_mount_opt, DEBUG); |
| 557 | break; | 549 | break; |
| @@ -437,6 +437,9 @@ ext2_xattr_set(struct inode *inode, int name_index, const char *name, · 436 unmodified lines | |||
| 437 | name_len = strlen(name); | 437 | name_len = strlen(name); |
| 438 | if (name_len > 255 || value_len > sb->s_blocksize) | 438 | if (name_len > 255 || value_len > sb->s_blocksize) |
| 439 | return -ERANGE; | 439 | return -ERANGE; |
| 440 | error = dquot_initialize(inode); | ||
| 441 | if (error) | ||
| 442 | return error; | ||
| 440 | down_write(&EXT2_I(inode)->xattr_sem); | 443 | down_write(&EXT2_I(inode)->xattr_sem); |
| 441 | if (EXT2_I(inode)->i_file_acl) { | 444 | if (EXT2_I(inode)->i_file_acl) { |
| 442 | /* The inode already has an extended attribute block. */ | 445 | /* The inode already has an extended attribute block. */ |
| @@ -588,7 +591,6 @@ bad_block: · 145 unmodified lines | |||
| 588 | /* Remove the old value. */ | 591 | /* Remove the old value. */ |
| 589 | memmove(first_val + size, first_val, val - first_val); | 592 | memmove(first_val + size, first_val, val - first_val); |
| 590 | memset(first_val, 0, size); | 593 | memset(first_val, 0, size); |
| 591 | here->e_value_offs = 0; | ||
| 592 | min_offs += size; | 594 | min_offs += size; |
| 593 | 595 | ||
| 594 | /* Adjust all value offsets. */ | 596 | /* Adjust all value offsets. */ |
| @@ -600,6 +602,8 @@ bad_block: · 5 unmodified lines | |||
| 600 | cpu_to_le16(o + size); | 602 | cpu_to_le16(o + size); |
| 601 | last = EXT2_XATTR_NEXT(last); | 603 | last = EXT2_XATTR_NEXT(last); |
| 602 | } | 604 | } |
| 605 | |||
| 606 | here->e_value_offs = 0; | ||
| 603 | } | 607 | } |
| 604 | if (value == NULL) { | 608 | if (value == NULL) { |
| 605 | /* Remove the old name. */ | 609 | /* Remove the old name. */ |
| @@ -15,7 +15,7 @@ config QUOTA · 14 unmodified lines | |||
| 15 | Ext3, ext4 and reiserfs also support journaled quotas for which | 15 | Ext3, ext4 and reiserfs also support journaled quotas for which |
| 16 | you don't need to run quotacheck(8) after an unclean shutdown. | 16 | you don't need to run quotacheck(8) after an unclean shutdown. |
| 17 | For further details, read the Quota mini-HOWTO, available from | 17 | For further details, read the Quota mini-HOWTO, available from |
| 18 | <http://www.tldp.org/docs.html#howto>, or the documentation provided | 18 | <https://www.tldp.org/docs.html#howto>, or the documentation provided |
| 19 | with the quota tools. Probably the quota support is only useful for | 19 | with the quota tools. Probably the quota support is only useful for |
| 20 | multi user systems. If unsure, say N. | 20 | multi user systems. If unsure, say N. |
| 21 | 21 | ||
| @@ -289,7 +289,7 @@ void make_empty_dir_item_v1(char *body, __le32 dirid, __le32 objid, · 288 unmodified lines | |||
| 289 | 289 | ||
| 290 | /* direntry header of "." */ | 290 | /* direntry header of "." */ |
| 291 | put_deh_offset(dot, DOT_OFFSET); | 291 | put_deh_offset(dot, DOT_OFFSET); |
| 292 | /* these two are from make_le_item_head, and are are LE */ | 292 | /* these two are from make_le_item_head, and are LE */ |
| 293 | dot->deh_dir_id = dirid; | 293 | dot->deh_dir_id = dirid; |
| 294 | dot->deh_objectid = objid; | 294 | dot->deh_objectid = objid; |
| 295 | dot->deh_state = 0; /* Endian safe if 0 */ | 295 | dot->deh_state = 0; /* Endian safe if 0 */ |
| @@ -299,7 +299,7 @@ void make_empty_dir_item_v1(char *body, __le32 dirid, __le32 objid, · 3 unmodified lines | |||
| 299 | /* direntry header of ".." */ | 299 | /* direntry header of ".." */ |
| 300 | put_deh_offset(dotdot, DOT_DOT_OFFSET); | 300 | put_deh_offset(dotdot, DOT_DOT_OFFSET); |
| 301 | /* key of ".." for the root directory */ | 301 | /* key of ".." for the root directory */ |
| 302 | /* these two are from the inode, and are are LE */ | 302 | /* these two are from the inode, and are LE */ |
| 303 | dotdot->deh_dir_id = par_dirid; | 303 | dotdot->deh_dir_id = par_dirid; |
| 304 | dotdot->deh_objectid = par_objid; | 304 | dotdot->deh_objectid = par_objid; |
| 305 | dotdot->deh_state = 0; /* Endian safe if 0 */ | 305 | dotdot->deh_state = 0; /* Endian safe if 0 */ |
| @@ -323,7 +323,7 @@ void make_empty_dir_item(char *body, __le32 dirid, __le32 objid, · 17 unmodified lines | |||
| 323 | 323 | ||
| 324 | /* direntry header of "." */ | 324 | /* direntry header of "." */ |
| 325 | put_deh_offset(dot, DOT_OFFSET); | 325 | put_deh_offset(dot, DOT_OFFSET); |
| 326 | /* these two are from make_le_item_head, and are are LE */ | 326 | /* these two are from make_le_item_head, and are LE */ |
| 327 | dot->deh_dir_id = dirid; | 327 | dot->deh_dir_id = dirid; |
| 328 | dot->deh_objectid = objid; | 328 | dot->deh_objectid = objid; |
| 329 | dot->deh_state = 0; /* Endian safe if 0 */ | 329 | dot->deh_state = 0; /* Endian safe if 0 */ |
| @@ -333,7 +333,7 @@ void make_empty_dir_item(char *body, __le32 dirid, __le32 objid, · 3 unmodified lines | |||
| 333 | /* direntry header of ".." */ | 333 | /* direntry header of ".." */ |
| 334 | put_deh_offset(dotdot, DOT_DOT_OFFSET); | 334 | put_deh_offset(dotdot, DOT_DOT_OFFSET); |
| 335 | /* key of ".." for the root directory */ | 335 | /* key of ".." for the root directory */ |
| 336 | /* these two are from the inode, and are are LE */ | 336 | /* these two are from the inode, and are LE */ |
| 337 | dotdot->deh_dir_id = par_dirid; | 337 | dotdot->deh_dir_id = par_dirid; |
| 338 | dotdot->deh_objectid = par_objid; | 338 | dotdot->deh_objectid = par_objid; |
| 339 | dotdot->deh_state = 0; /* Endian safe if 0 */ | 339 | dotdot->deh_state = 0; /* Endian safe if 0 */ |
| @@ -611,9 +611,9 @@ static int get_num_ver(int mode, struct tree_balance *tb, int h, · 610 unmodified lines | |||
| 611 | * blk_num number of blocks that S[h] will be splitted into; | 611 | * blk_num number of blocks that S[h] will be splitted into; |
| 612 | * s012 number of items that fall into splitted nodes. | 612 | * s012 number of items that fall into splitted nodes. |
| 613 | * lbytes number of bytes which flow to the left neighbor from the | 613 | * lbytes number of bytes which flow to the left neighbor from the |
| 614 | * item that is not not shifted entirely | 614 | * item that is not shifted entirely |
| 615 | * rbytes number of bytes which flow to the right neighbor from the | 615 | * rbytes number of bytes which flow to the right neighbor from the |
| 616 | * item that is not not shifted entirely | 616 | * item that is not shifted entirely |
| 617 | * s1bytes number of bytes which flow to the first new node when | 617 | * s1bytes number of bytes which flow to the first new node when |
| 618 | * S[0] splits (this number is contained in s012 array) | 618 | * S[0] splits (this number is contained in s012 array) |
| 619 | */ | 619 | */ |
| @@ -32,7 +32,7 @@ · 31 unmodified lines | |||
| 32 | * to disk for all backgrounded commits that have been | 32 | * to disk for all backgrounded commits that have been |
| 33 | * around too long. | 33 | * around too long. |
| 34 | * -- Note, if you call this as an immediate flush from | 34 | * -- Note, if you call this as an immediate flush from |
| 35 | * from within kupdate, it will ignore the immediate flag | 35 | * within kupdate, it will ignore the immediate flag |
| 36 | */ | 36 | */ |
| 37 | 37 | ||
| 38 | #include <linux/time.h> | 38 | #include <linux/time.h> |
| @@ -1109,7 +1109,7 @@ int is_reiserfs_jr(struct reiserfs_super_block *rs); · 1108 unmodified lines | |||
| 1109 | * ReiserFS leaves the first 64k unused, so that partition labels have | 1109 | * ReiserFS leaves the first 64k unused, so that partition labels have |
| 1110 | * enough space. If someone wants to write a fancy bootloader that | 1110 | * enough space. If someone wants to write a fancy bootloader that |
| 1111 | * needs more than 64k, let us know, and this will be increased in size. | 1111 | * needs more than 64k, let us know, and this will be increased in size. |
| 1112 | * This number must be larger than than the largest block size on any | 1112 | * This number must be larger than the largest block size on any |
| 1113 | * platform, or code will break. -Hans | 1113 | * platform, or code will break. -Hans |
| 1114 | */ | 1114 | */ |
| 1115 | #define REISERFS_DISK_OFFSET_IN_BYTES (64 * 1024) | 1115 | #define REISERFS_DISK_OFFSET_IN_BYTES (64 * 1024) |
| @@ -373,7 +373,7 @@ int reiserfs_cache_default_acl(struct inode *inode) · 372 unmodified lines | |||
| 373 | 373 | ||
| 374 | /* Other xattrs can be created during inode creation. We don't | 374 | /* Other xattrs can be created during inode creation. We don't |
| 375 | * want to claim too many blocks, so we check to see if we | 375 | * want to claim too many blocks, so we check to see if we |
| 376 | * we need to create the tree to the xattrs, and then we | 376 | * need to create the tree to the xattrs, and then we |
| 377 | * just want two files. */ | 377 | * just want two files. */ |
| 378 | nblocks = reiserfs_xattr_jcreate_nblocks(inode); | 378 | nblocks = reiserfs_xattr_jcreate_nblocks(inode); |
| 379 | nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); | 379 | nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); |
| @@ -2,7 +2,7 @@ · 1 unmodified line | |||
| 2 | * ecma_167.h | 2 | * ecma_167.h |
| 3 | * | 3 | * |
| 4 | * This file is based on ECMA-167 3rd edition (June 1997) | 4 | * This file is based on ECMA-167 3rd edition (June 1997) |
| 5 | * http://www.ecma.ch | 5 | * https://www.ecma.ch |
| 6 | * | 6 | * |
| 7 | * Copyright (c) 2001-2002 Ben Fennema | 7 | * Copyright (c) 2001-2002 Ben Fennema |
| 8 | * Copyright (c) 2017-2019 Pali Rohár <pali@kernel.org> | 8 | * Copyright (c) 2017-2019 Pali Rohár <pali@kernel.org> |
| @@ -226,7 +226,7 @@ struct sparingTable { · 225 unmodified lines | |||
| 226 | #define ICBTAG_FILE_TYPE_MIRROR 0xFB | 226 | #define ICBTAG_FILE_TYPE_MIRROR 0xFB |
| 227 | #define ICBTAG_FILE_TYPE_BITMAP 0xFC | 227 | #define ICBTAG_FILE_TYPE_BITMAP 0xFC |
| 228 | 228 | ||
| 229 | /* struct struct long_ad ICB - ADImpUse (UDF 2.60 2.2.4.3) */ | 229 | /* struct long_ad ICB - ADImpUse (UDF 2.60 2.2.4.3) */ |
| 230 | struct allocDescImpUse { | 230 | struct allocDescImpUse { |
| 231 | __le16 flags; | 231 | __le16 flags; |
| 232 | uint8_t impUse[4]; | 232 | uint8_t impUse[4]; |
| @@ -11,8 +11,8 @@ · 10 unmodified lines | |||
| 11 | * This code is based on version 2.00 of the UDF specification, | 11 | * This code is based on version 2.00 of the UDF specification, |
| 12 | * and revision 3 of the ECMA 167 standard [equivalent to ISO 13346]. | 12 | * and revision 3 of the ECMA 167 standard [equivalent to ISO 13346]. |
| 13 | * http://www.osta.org/ | 13 | * http://www.osta.org/ |
| 14 | * http://www.ecma.ch/ | 14 | * https://www.ecma.ch/ |
| 15 | * http://www.iso.org/ | 15 | * https://www.iso.org/ |
| 16 | * | 16 | * |
| 17 | * COPYRIGHT | 17 | * COPYRIGHT |
| 18 | * This file is distributed under the terms of the GNU General Public | 18 | * This file is distributed under the terms of the GNU General Public |