diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:15 -0400 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:59 -0400 |
| commit | 07f9479a40cc778bc1462ada11f95b01360ae4ff (patch) | |
| tree | 0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /fs/ext2 | |
| parent | 9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff) | |
| parent | cd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff) | |
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
Diffstat (limited to 'fs/ext2')
| -rw-r--r-- | fs/ext2/acl.c | 2 | ||||
| -rw-r--r-- | fs/ext2/balloc.c | 6 | ||||
| -rw-r--r-- | fs/ext2/ext2.h | 6 | ||||
| -rw-r--r-- | fs/ext2/inode.c | 10 | ||||
| -rw-r--r-- | fs/ext2/ioctl.c | 6 | ||||
| -rw-r--r-- | fs/ext2/super.c | 2 | ||||
| -rw-r--r-- | fs/ext2/xattr.c | 2 |
7 files changed, 19 insertions, 15 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 7b4180554a62..abea5a17c764 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c | |||
| @@ -406,7 +406,7 @@ ext2_xattr_set_acl(struct dentry *dentry, const char *name, const void *value, | |||
| 406 | return -EINVAL; | 406 | return -EINVAL; |
| 407 | if (!test_opt(dentry->d_sb, POSIX_ACL)) | 407 | if (!test_opt(dentry->d_sb, POSIX_ACL)) |
| 408 | return -EOPNOTSUPP; | 408 | return -EOPNOTSUPP; |
| 409 | if (!is_owner_or_cap(dentry->d_inode)) | 409 | if (!inode_owner_or_capable(dentry->d_inode)) |
| 410 | return -EPERM; | 410 | return -EPERM; |
| 411 | 411 | ||
| 412 | if (value) { | 412 | if (value) { |
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 0d06f4e75699..8f44cef1b3ef 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
| @@ -850,7 +850,7 @@ static int find_next_reservable_window( | |||
| 850 | rsv_window_remove(sb, my_rsv); | 850 | rsv_window_remove(sb, my_rsv); |
| 851 | 851 | ||
| 852 | /* | 852 | /* |
| 853 | * Let's book the whole avaliable window for now. We will check the | 853 | * Let's book the whole available window for now. We will check the |
| 854 | * disk bitmap later and then, if there are free blocks then we adjust | 854 | * disk bitmap later and then, if there are free blocks then we adjust |
| 855 | * the window size if it's larger than requested. | 855 | * the window size if it's larger than requested. |
| 856 | * Otherwise, we will remove this node from the tree next time | 856 | * Otherwise, we will remove this node from the tree next time |
| @@ -1357,9 +1357,9 @@ retry_alloc: | |||
| 1357 | goto allocated; | 1357 | goto allocated; |
| 1358 | } | 1358 | } |
| 1359 | /* | 1359 | /* |
| 1360 | * We may end up a bogus ealier ENOSPC error due to | 1360 | * We may end up a bogus earlier ENOSPC error due to |
| 1361 | * filesystem is "full" of reservations, but | 1361 | * filesystem is "full" of reservations, but |
| 1362 | * there maybe indeed free blocks avaliable on disk | 1362 | * there maybe indeed free blocks available on disk |
| 1363 | * In this case, we just forget about the reservations | 1363 | * In this case, we just forget about the reservations |
| 1364 | * just do block allocation as without reservations. | 1364 | * just do block allocation as without reservations. |
| 1365 | */ | 1365 | */ |
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index 1b48c3370872..645be9e7ee47 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h | |||
| @@ -174,3 +174,9 @@ ext2_group_first_block_no(struct super_block *sb, unsigned long group_no) | |||
| 174 | return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) + | 174 | return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) + |
| 175 | le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block); | 175 | le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block); |
| 176 | } | 176 | } |
| 177 | |||
| 178 | #define ext2_set_bit __test_and_set_bit_le | ||
| 179 | #define ext2_clear_bit __test_and_clear_bit_le | ||
| 180 | #define ext2_test_bit test_bit_le | ||
| 181 | #define ext2_find_first_zero_bit find_first_zero_bit_le | ||
| 182 | #define ext2_find_next_zero_bit find_next_zero_bit_le | ||
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 40ad210a5049..788e09a07f7e 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
| @@ -305,7 +305,7 @@ static ext2_fsblk_t ext2_find_near(struct inode *inode, Indirect *ind) | |||
| 305 | return ind->bh->b_blocknr; | 305 | return ind->bh->b_blocknr; |
| 306 | 306 | ||
| 307 | /* | 307 | /* |
| 308 | * It is going to be refered from inode itself? OK, just put it into | 308 | * It is going to be referred from inode itself? OK, just put it into |
| 309 | * the same cylinder group then. | 309 | * the same cylinder group then. |
| 310 | */ | 310 | */ |
| 311 | bg_start = ext2_group_first_block_no(inode->i_sb, ei->i_block_group); | 311 | bg_start = ext2_group_first_block_no(inode->i_sb, ei->i_block_group); |
| @@ -860,7 +860,6 @@ const struct address_space_operations ext2_aops = { | |||
| 860 | .readpage = ext2_readpage, | 860 | .readpage = ext2_readpage, |
| 861 | .readpages = ext2_readpages, | 861 | .readpages = ext2_readpages, |
| 862 | .writepage = ext2_writepage, | 862 | .writepage = ext2_writepage, |
| 863 | .sync_page = block_sync_page, | ||
| 864 | .write_begin = ext2_write_begin, | 863 | .write_begin = ext2_write_begin, |
| 865 | .write_end = ext2_write_end, | 864 | .write_end = ext2_write_end, |
| 866 | .bmap = ext2_bmap, | 865 | .bmap = ext2_bmap, |
| @@ -880,7 +879,6 @@ const struct address_space_operations ext2_nobh_aops = { | |||
| 880 | .readpage = ext2_readpage, | 879 | .readpage = ext2_readpage, |
| 881 | .readpages = ext2_readpages, | 880 | .readpages = ext2_readpages, |
| 882 | .writepage = ext2_nobh_writepage, | 881 | .writepage = ext2_nobh_writepage, |
| 883 | .sync_page = block_sync_page, | ||
| 884 | .write_begin = ext2_nobh_write_begin, | 882 | .write_begin = ext2_nobh_write_begin, |
| 885 | .write_end = nobh_write_end, | 883 | .write_end = nobh_write_end, |
| 886 | .bmap = ext2_bmap, | 884 | .bmap = ext2_bmap, |
| @@ -915,7 +913,7 @@ static inline int all_zeroes(__le32 *p, __le32 *q) | |||
| 915 | * | 913 | * |
| 916 | * When we do truncate() we may have to clean the ends of several indirect | 914 | * When we do truncate() we may have to clean the ends of several indirect |
| 917 | * blocks but leave the blocks themselves alive. Block is partially | 915 | * blocks but leave the blocks themselves alive. Block is partially |
| 918 | * truncated if some data below the new i_size is refered from it (and | 916 | * truncated if some data below the new i_size is referred from it (and |
| 919 | * it is on the path to the first completely truncated data block, indeed). | 917 | * it is on the path to the first completely truncated data block, indeed). |
| 920 | * We have to free the top of that path along with everything to the right | 918 | * We have to free the top of that path along with everything to the right |
| 921 | * of the path. Since no allocation past the truncation point is possible | 919 | * of the path. Since no allocation past the truncation point is possible |
| @@ -992,7 +990,7 @@ no_top: | |||
| 992 | * @p: array of block numbers | 990 | * @p: array of block numbers |
| 993 | * @q: points immediately past the end of array | 991 | * @q: points immediately past the end of array |
| 994 | * | 992 | * |
| 995 | * We are freeing all blocks refered from that array (numbers are | 993 | * We are freeing all blocks referred from that array (numbers are |
| 996 | * stored as little-endian 32-bit) and updating @inode->i_blocks | 994 | * stored as little-endian 32-bit) and updating @inode->i_blocks |
| 997 | * appropriately. | 995 | * appropriately. |
| 998 | */ | 996 | */ |
| @@ -1032,7 +1030,7 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q) | |||
| 1032 | * @q: pointer immediately past the end of array | 1030 | * @q: pointer immediately past the end of array |
| 1033 | * @depth: depth of the branches to free | 1031 | * @depth: depth of the branches to free |
| 1034 | * | 1032 | * |
| 1035 | * We are freeing all blocks refered from these branches (numbers are | 1033 | * We are freeing all blocks referred from these branches (numbers are |
| 1036 | * stored as little-endian 32-bit) and updating @inode->i_blocks | 1034 | * stored as little-endian 32-bit) and updating @inode->i_blocks |
| 1037 | * appropriately. | 1035 | * appropriately. |
| 1038 | */ | 1036 | */ |
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c index e7431309bdca..f81e250ac5c4 100644 --- a/fs/ext2/ioctl.c +++ b/fs/ext2/ioctl.c | |||
| @@ -39,7 +39,7 @@ long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
| 39 | if (ret) | 39 | if (ret) |
| 40 | return ret; | 40 | return ret; |
| 41 | 41 | ||
| 42 | if (!is_owner_or_cap(inode)) { | 42 | if (!inode_owner_or_capable(inode)) { |
| 43 | ret = -EACCES; | 43 | ret = -EACCES; |
| 44 | goto setflags_out; | 44 | goto setflags_out; |
| 45 | } | 45 | } |
| @@ -89,7 +89,7 @@ setflags_out: | |||
| 89 | case EXT2_IOC_GETVERSION: | 89 | case EXT2_IOC_GETVERSION: |
| 90 | return put_user(inode->i_generation, (int __user *) arg); | 90 | return put_user(inode->i_generation, (int __user *) arg); |
| 91 | case EXT2_IOC_SETVERSION: | 91 | case EXT2_IOC_SETVERSION: |
| 92 | if (!is_owner_or_cap(inode)) | 92 | if (!inode_owner_or_capable(inode)) |
| 93 | return -EPERM; | 93 | return -EPERM; |
| 94 | ret = mnt_want_write(filp->f_path.mnt); | 94 | ret = mnt_want_write(filp->f_path.mnt); |
| 95 | if (ret) | 95 | if (ret) |
| @@ -115,7 +115,7 @@ setflags_out: | |||
| 115 | if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode)) | 115 | if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode)) |
| 116 | return -ENOTTY; | 116 | return -ENOTTY; |
| 117 | 117 | ||
| 118 | if (!is_owner_or_cap(inode)) | 118 | if (!inode_owner_or_capable(inode)) |
| 119 | return -EACCES; | 119 | return -EACCES; |
| 120 | 120 | ||
| 121 | if (get_user(rsv_window_size, (int __user *)arg)) | 121 | if (get_user(rsv_window_size, (int __user *)arg)) |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 7731695e65d9..0a78dae7e2cb 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
| @@ -1382,7 +1382,7 @@ static struct dentry *ext2_mount(struct file_system_type *fs_type, | |||
| 1382 | 1382 | ||
| 1383 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 1383 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |
| 1384 | * acquiring the locks... As quota files are never truncated and quota code | 1384 | * acquiring the locks... As quota files are never truncated and quota code |
| 1385 | * itself serializes the operations (and noone else should touch the files) | 1385 | * itself serializes the operations (and no one else should touch the files) |
| 1386 | * we don't have to be afraid of races */ | 1386 | * we don't have to be afraid of races */ |
| 1387 | static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, | 1387 | static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, |
| 1388 | size_t len, loff_t off) | 1388 | size_t len, loff_t off) |
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index c2e4dce984d2..529970617a21 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * +------------------+ | 35 | * +------------------+ |
| 36 | * | 36 | * |
| 37 | * The block header is followed by multiple entry descriptors. These entry | 37 | * The block header is followed by multiple entry descriptors. These entry |
| 38 | * descriptors are variable in size, and alligned to EXT2_XATTR_PAD | 38 | * descriptors are variable in size, and aligned to EXT2_XATTR_PAD |
| 39 | * byte boundaries. The entry descriptors are sorted by attribute name, | 39 | * byte boundaries. The entry descriptors are sorted by attribute name, |
| 40 | * so that two extended attribute blocks can be compared efficiently. | 40 | * so that two extended attribute blocks can be compared efficiently. |
| 41 | * | 41 | * |
