diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-03-30 14:02:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 15:16:39 -0400 |
commit | 0222e6571c332563a48d4cf5487b67feabe60b5e (patch) | |
tree | 44829ca0a4b1343edec08d4f70696cb0d3218975 /fs/reiserfs/inode.c | |
parent | 3cd6dbe6feb9b32347e6c6f25a27f0cde9d50418 (diff) |
reiserfs: strip trailing whitespace
This patch strips trailing whitespace from the reiserfs code.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index fcd302d81447..d106edaef64f 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -52,7 +52,7 @@ void reiserfs_delete_inode(struct inode *inode) | |||
52 | /* Do quota update inside a transaction for journaled quotas. We must do that | 52 | /* Do quota update inside a transaction for journaled quotas. We must do that |
53 | * after delete_object so that quota updates go into the same transaction as | 53 | * after delete_object so that quota updates go into the same transaction as |
54 | * stat data deletion */ | 54 | * stat data deletion */ |
55 | if (!err) | 55 | if (!err) |
56 | DQUOT_FREE_INODE(inode); | 56 | DQUOT_FREE_INODE(inode); |
57 | 57 | ||
58 | if (journal_end(&th, inode->i_sb, jbegin_count)) | 58 | if (journal_end(&th, inode->i_sb, jbegin_count)) |
@@ -363,7 +363,7 @@ static int _get_block_create_0(struct inode *inode, sector_t block, | |||
363 | } | 363 | } |
364 | /* make sure we don't read more bytes than actually exist in | 364 | /* make sure we don't read more bytes than actually exist in |
365 | ** the file. This can happen in odd cases where i_size isn't | 365 | ** the file. This can happen in odd cases where i_size isn't |
366 | ** correct, and when direct item padding results in a few | 366 | ** correct, and when direct item padding results in a few |
367 | ** extra bytes at the end of the direct item | 367 | ** extra bytes at the end of the direct item |
368 | */ | 368 | */ |
369 | if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) | 369 | if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) |
@@ -438,15 +438,15 @@ static int reiserfs_bmap(struct inode *inode, sector_t block, | |||
438 | ** -ENOENT instead of a valid buffer. block_prepare_write expects to | 438 | ** -ENOENT instead of a valid buffer. block_prepare_write expects to |
439 | ** be able to do i/o on the buffers returned, unless an error value | 439 | ** be able to do i/o on the buffers returned, unless an error value |
440 | ** is also returned. | 440 | ** is also returned. |
441 | ** | 441 | ** |
442 | ** So, this allows block_prepare_write to be used for reading a single block | 442 | ** So, this allows block_prepare_write to be used for reading a single block |
443 | ** in a page. Where it does not produce a valid page for holes, or past the | 443 | ** in a page. Where it does not produce a valid page for holes, or past the |
444 | ** end of the file. This turns out to be exactly what we need for reading | 444 | ** end of the file. This turns out to be exactly what we need for reading |
445 | ** tails for conversion. | 445 | ** tails for conversion. |
446 | ** | 446 | ** |
447 | ** The point of the wrapper is forcing a certain value for create, even | 447 | ** The point of the wrapper is forcing a certain value for create, even |
448 | ** though the VFS layer is calling this function with create==1. If you | 448 | ** though the VFS layer is calling this function with create==1. If you |
449 | ** don't want to send create == GET_BLOCK_NO_HOLE to reiserfs_get_block, | 449 | ** don't want to send create == GET_BLOCK_NO_HOLE to reiserfs_get_block, |
450 | ** don't use this function. | 450 | ** don't use this function. |
451 | */ | 451 | */ |
452 | static int reiserfs_get_block_create_0(struct inode *inode, sector_t block, | 452 | static int reiserfs_get_block_create_0(struct inode *inode, sector_t block, |
@@ -602,7 +602,7 @@ int reiserfs_get_block(struct inode *inode, sector_t block, | |||
602 | int done; | 602 | int done; |
603 | int fs_gen; | 603 | int fs_gen; |
604 | struct reiserfs_transaction_handle *th = NULL; | 604 | struct reiserfs_transaction_handle *th = NULL; |
605 | /* space reserved in transaction batch: | 605 | /* space reserved in transaction batch: |
606 | . 3 balancings in direct->indirect conversion | 606 | . 3 balancings in direct->indirect conversion |
607 | . 1 block involved into reiserfs_update_sd() | 607 | . 1 block involved into reiserfs_update_sd() |
608 | XXX in practically impossible worst case direct2indirect() | 608 | XXX in practically impossible worst case direct2indirect() |
@@ -754,7 +754,7 @@ int reiserfs_get_block(struct inode *inode, sector_t block, | |||
754 | reiserfs_write_unlock(inode->i_sb); | 754 | reiserfs_write_unlock(inode->i_sb); |
755 | 755 | ||
756 | /* the item was found, so new blocks were not added to the file | 756 | /* the item was found, so new blocks were not added to the file |
757 | ** there is no need to make sure the inode is updated with this | 757 | ** there is no need to make sure the inode is updated with this |
758 | ** transaction | 758 | ** transaction |
759 | */ | 759 | */ |
760 | return retval; | 760 | return retval; |
@@ -986,7 +986,7 @@ int reiserfs_get_block(struct inode *inode, sector_t block, | |||
986 | 986 | ||
987 | /* this loop could log more blocks than we had originally asked | 987 | /* this loop could log more blocks than we had originally asked |
988 | ** for. So, we have to allow the transaction to end if it is | 988 | ** for. So, we have to allow the transaction to end if it is |
989 | ** too big or too full. Update the inode so things are | 989 | ** too big or too full. Update the inode so things are |
990 | ** consistent if we crash before the function returns | 990 | ** consistent if we crash before the function returns |
991 | ** | 991 | ** |
992 | ** release the path so that anybody waiting on the path before | 992 | ** release the path so that anybody waiting on the path before |
@@ -997,7 +997,7 @@ int reiserfs_get_block(struct inode *inode, sector_t block, | |||
997 | if (retval) | 997 | if (retval) |
998 | goto failure; | 998 | goto failure; |
999 | } | 999 | } |
1000 | /* inserting indirect pointers for a hole can take a | 1000 | /* inserting indirect pointers for a hole can take a |
1001 | ** long time. reschedule if needed | 1001 | ** long time. reschedule if needed |
1002 | */ | 1002 | */ |
1003 | cond_resched(); | 1003 | cond_resched(); |
@@ -1444,7 +1444,7 @@ void reiserfs_read_locked_inode(struct inode *inode, | |||
1444 | update sd on unlink all that is required is to check for nlink | 1444 | update sd on unlink all that is required is to check for nlink |
1445 | here. This bug was first found by Sizif when debugging | 1445 | here. This bug was first found by Sizif when debugging |
1446 | SquidNG/Butterfly, forgotten, and found again after Philippe | 1446 | SquidNG/Butterfly, forgotten, and found again after Philippe |
1447 | Gramoulle <philippe.gramoulle@mmania.com> reproduced it. | 1447 | Gramoulle <philippe.gramoulle@mmania.com> reproduced it. |
1448 | 1448 | ||
1449 | More logical fix would require changes in fs/inode.c:iput() to | 1449 | More logical fix would require changes in fs/inode.c:iput() to |
1450 | remove inode from hash-table _after_ fs cleaned disk stuff up and | 1450 | remove inode from hash-table _after_ fs cleaned disk stuff up and |
@@ -1619,7 +1619,7 @@ int reiserfs_write_inode(struct inode *inode, int do_sync) | |||
1619 | if (inode->i_sb->s_flags & MS_RDONLY) | 1619 | if (inode->i_sb->s_flags & MS_RDONLY) |
1620 | return -EROFS; | 1620 | return -EROFS; |
1621 | /* memory pressure can sometimes initiate write_inode calls with sync == 1, | 1621 | /* memory pressure can sometimes initiate write_inode calls with sync == 1, |
1622 | ** these cases are just when the system needs ram, not when the | 1622 | ** these cases are just when the system needs ram, not when the |
1623 | ** inode needs to reach disk for safety, and they can safely be | 1623 | ** inode needs to reach disk for safety, and they can safely be |
1624 | ** ignored because the altered inode has already been logged. | 1624 | ** ignored because the altered inode has already been logged. |
1625 | */ | 1625 | */ |
@@ -1736,7 +1736,7 @@ static int reiserfs_new_symlink(struct reiserfs_transaction_handle *th, struct i | |||
1736 | /* inserts the stat data into the tree, and then calls | 1736 | /* inserts the stat data into the tree, and then calls |
1737 | reiserfs_new_directory (to insert ".", ".." item if new object is | 1737 | reiserfs_new_directory (to insert ".", ".." item if new object is |
1738 | directory) or reiserfs_new_symlink (to insert symlink body if new | 1738 | directory) or reiserfs_new_symlink (to insert symlink body if new |
1739 | object is symlink) or nothing (if new object is regular file) | 1739 | object is symlink) or nothing (if new object is regular file) |
1740 | 1740 | ||
1741 | NOTE! uid and gid must already be set in the inode. If we return | 1741 | NOTE! uid and gid must already be set in the inode. If we return |
1742 | non-zero due to an error, we have to drop the quota previously allocated | 1742 | non-zero due to an error, we have to drop the quota previously allocated |
@@ -1744,7 +1744,7 @@ static int reiserfs_new_symlink(struct reiserfs_transaction_handle *th, struct i | |||
1744 | if we return non-zero, we also end the transaction. */ | 1744 | if we return non-zero, we also end the transaction. */ |
1745 | int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | 1745 | int reiserfs_new_inode(struct reiserfs_transaction_handle *th, |
1746 | struct inode *dir, int mode, const char *symname, | 1746 | struct inode *dir, int mode, const char *symname, |
1747 | /* 0 for regular, EMTRY_DIR_SIZE for dirs, | 1747 | /* 0 for regular, EMTRY_DIR_SIZE for dirs, |
1748 | strlen (symname) for symlinks) */ | 1748 | strlen (symname) for symlinks) */ |
1749 | loff_t i_size, struct dentry *dentry, | 1749 | loff_t i_size, struct dentry *dentry, |
1750 | struct inode *inode, | 1750 | struct inode *inode, |
@@ -1794,7 +1794,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1794 | goto out_bad_inode; | 1794 | goto out_bad_inode; |
1795 | } | 1795 | } |
1796 | if (old_format_only(sb)) | 1796 | if (old_format_only(sb)) |
1797 | /* not a perfect generation count, as object ids can be reused, but | 1797 | /* not a perfect generation count, as object ids can be reused, but |
1798 | ** this is as good as reiserfs can do right now. | 1798 | ** this is as good as reiserfs can do right now. |
1799 | ** note that the private part of inode isn't filled in yet, we have | 1799 | ** note that the private part of inode isn't filled in yet, we have |
1800 | ** to use the directory. | 1800 | ** to use the directory. |
@@ -2081,7 +2081,7 @@ int reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) | |||
2081 | 2081 | ||
2082 | if (p_s_inode->i_size > 0) { | 2082 | if (p_s_inode->i_size > 0) { |
2083 | if ((error = grab_tail_page(p_s_inode, &page, &bh))) { | 2083 | if ((error = grab_tail_page(p_s_inode, &page, &bh))) { |
2084 | // -ENOENT means we truncated past the end of the file, | 2084 | // -ENOENT means we truncated past the end of the file, |
2085 | // and get_block_create_0 could not find a block to read in, | 2085 | // and get_block_create_0 could not find a block to read in, |
2086 | // which is ok. | 2086 | // which is ok. |
2087 | if (error != -ENOENT) | 2087 | if (error != -ENOENT) |
@@ -2093,11 +2093,11 @@ int reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) | |||
2093 | } | 2093 | } |
2094 | } | 2094 | } |
2095 | 2095 | ||
2096 | /* so, if page != NULL, we have a buffer head for the offset at | 2096 | /* so, if page != NULL, we have a buffer head for the offset at |
2097 | ** the end of the file. if the bh is mapped, and bh->b_blocknr != 0, | 2097 | ** the end of the file. if the bh is mapped, and bh->b_blocknr != 0, |
2098 | ** then we have an unformatted node. Otherwise, we have a direct item, | 2098 | ** then we have an unformatted node. Otherwise, we have a direct item, |
2099 | ** and no zeroing is required on disk. We zero after the truncate, | 2099 | ** and no zeroing is required on disk. We zero after the truncate, |
2100 | ** because the truncate might pack the item anyway | 2100 | ** because the truncate might pack the item anyway |
2101 | ** (it will unmap bh if it packs). | 2101 | ** (it will unmap bh if it packs). |
2102 | */ | 2102 | */ |
2103 | /* it is enough to reserve space in transaction for 2 balancings: | 2103 | /* it is enough to reserve space in transaction for 2 balancings: |
@@ -2306,8 +2306,8 @@ static int map_block_for_writepage(struct inode *inode, | |||
2306 | return retval; | 2306 | return retval; |
2307 | } | 2307 | } |
2308 | 2308 | ||
2309 | /* | 2309 | /* |
2310 | * mason@suse.com: updated in 2.5.54 to follow the same general io | 2310 | * mason@suse.com: updated in 2.5.54 to follow the same general io |
2311 | * start/recovery path as __block_write_full_page, along with special | 2311 | * start/recovery path as __block_write_full_page, along with special |
2312 | * code to handle reiserfs tails. | 2312 | * code to handle reiserfs tails. |
2313 | */ | 2313 | */ |
@@ -2447,7 +2447,7 @@ static int reiserfs_write_full_page(struct page *page, | |||
2447 | unlock_page(page); | 2447 | unlock_page(page); |
2448 | 2448 | ||
2449 | /* | 2449 | /* |
2450 | * since any buffer might be the only dirty buffer on the page, | 2450 | * since any buffer might be the only dirty buffer on the page, |
2451 | * the first submit_bh can bring the page out of writeback. | 2451 | * the first submit_bh can bring the page out of writeback. |
2452 | * be careful with the buffers. | 2452 | * be careful with the buffers. |
2453 | */ | 2453 | */ |
@@ -2466,8 +2466,8 @@ static int reiserfs_write_full_page(struct page *page, | |||
2466 | if (nr == 0) { | 2466 | if (nr == 0) { |
2467 | /* | 2467 | /* |
2468 | * if this page only had a direct item, it is very possible for | 2468 | * if this page only had a direct item, it is very possible for |
2469 | * no io to be required without there being an error. Or, | 2469 | * no io to be required without there being an error. Or, |
2470 | * someone else could have locked them and sent them down the | 2470 | * someone else could have locked them and sent them down the |
2471 | * pipe without locking the page | 2471 | * pipe without locking the page |
2472 | */ | 2472 | */ |
2473 | bh = head; | 2473 | bh = head; |
@@ -2486,7 +2486,7 @@ static int reiserfs_write_full_page(struct page *page, | |||
2486 | 2486 | ||
2487 | fail: | 2487 | fail: |
2488 | /* catches various errors, we need to make sure any valid dirty blocks | 2488 | /* catches various errors, we need to make sure any valid dirty blocks |
2489 | * get to the media. The page is currently locked and not marked for | 2489 | * get to the media. The page is currently locked and not marked for |
2490 | * writeback | 2490 | * writeback |
2491 | */ | 2491 | */ |
2492 | ClearPageUptodate(page); | 2492 | ClearPageUptodate(page); |