diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 17:53:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 17:53:17 -0400 |
commit | 460352c2f18e18accc993a9127a03e903ed8e0ed (patch) | |
tree | 1f9ea8ac2d965e785fedf79499244788485d6452 | |
parent | 74fee4e88fd196c712abfdae89acfa272abf10f8 (diff) | |
parent | c9ea9df3032eff1c57853fdf3d54e276d63b4b4d (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull UDF, reiserfs, quota, fsnotify cleanups from Jan Kara:
"Several UDF, reiserfs, quota and fsnotify cleanups.
Note that there is also a patch updating MAINTAINERS entry for
notification subsystem to point to me as a maintainer since current
entries are stale"
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
fsnotify: make dnotify_fsnotify_ops const
isofs: Delete an unnecessary variable initialisation in isofs_read_inode()
isofs: Adjust four checks for null pointers
isofs: Delete an error message for a failed memory allocation in isofs_read_inode()
quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info()
fs-udf: Delete an error message for a failed memory allocation in two functions
fs-udf: Improve six size determinations
fs-udf: Adjust two checks for null pointers
reiserfs: fix spelling mistake: "tranasction" -> "transaction"
MAINTAINERS: Update entries for notification subsystem
uapi/linux/quota.h: Do not include linux/errno.h
-rw-r--r-- | MAINTAINERS | 14 | ||||
-rw-r--r-- | fs/isofs/inode.c | 11 | ||||
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 2 | ||||
-rw-r--r-- | fs/quota/quota_v2.c | 6 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 2 | ||||
-rw-r--r-- | fs/udf/inode.c | 13 | ||||
-rw-r--r-- | fs/udf/namei.c | 2 | ||||
-rw-r--r-- | fs/udf/super.c | 12 | ||||
-rw-r--r-- | include/uapi/linux/quota.h | 1 |
9 files changed, 28 insertions, 35 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index ac2dfb26d899..8dc0e39997d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4136,7 +4136,9 @@ F: include/linux/dax.h | |||
4136 | F: include/trace/events/fs_dax.h | 4136 | F: include/trace/events/fs_dax.h |
4137 | 4137 | ||
4138 | DIRECTORY NOTIFICATION (DNOTIFY) | 4138 | DIRECTORY NOTIFICATION (DNOTIFY) |
4139 | M: Eric Paris <eparis@parisplace.org> | 4139 | M: Jan Kara <jack@suse.cz> |
4140 | R: Amir Goldstein <amir73il@gmail.com> | ||
4141 | L: linux-fsdevel@vger.kernel.org | ||
4140 | S: Maintained | 4142 | S: Maintained |
4141 | F: Documentation/filesystems/dnotify.txt | 4143 | F: Documentation/filesystems/dnotify.txt |
4142 | F: fs/notify/dnotify/ | 4144 | F: fs/notify/dnotify/ |
@@ -5247,7 +5249,9 @@ F: Documentation/hwmon/f71805f | |||
5247 | F: drivers/hwmon/f71805f.c | 5249 | F: drivers/hwmon/f71805f.c |
5248 | 5250 | ||
5249 | FANOTIFY | 5251 | FANOTIFY |
5250 | M: Eric Paris <eparis@redhat.com> | 5252 | M: Jan Kara <jack@suse.cz> |
5253 | R: Amir Goldstein <amir73il@gmail.com> | ||
5254 | L: linux-fsdevel@vger.kernel.org | ||
5251 | S: Maintained | 5255 | S: Maintained |
5252 | F: fs/notify/fanotify/ | 5256 | F: fs/notify/fanotify/ |
5253 | F: include/linux/fanotify.h | 5257 | F: include/linux/fanotify.h |
@@ -6757,9 +6761,9 @@ S: Maintained | |||
6757 | F: drivers/mtd/nand/jz4780_* | 6761 | F: drivers/mtd/nand/jz4780_* |
6758 | 6762 | ||
6759 | INOTIFY | 6763 | INOTIFY |
6760 | M: John McCutchan <john@johnmccutchan.com> | 6764 | M: Jan Kara <jack@suse.cz> |
6761 | M: Robert Love <rlove@rlove.org> | 6765 | R: Amir Goldstein <amir73il@gmail.com> |
6762 | M: Eric Paris <eparis@parisplace.org> | 6766 | L: linux-fsdevel@vger.kernel.org |
6763 | S: Maintained | 6767 | S: Maintained |
6764 | F: Documentation/filesystems/inotify.txt | 6768 | F: Documentation/filesystems/inotify.txt |
6765 | F: fs/notify/inotify/ | 6769 | F: fs/notify/inotify/ |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 217a5e7815da..f1ed935322db 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -96,7 +96,7 @@ static int __init init_inodecache(void) | |||
96 | 0, (SLAB_RECLAIM_ACCOUNT| | 96 | 0, (SLAB_RECLAIM_ACCOUNT| |
97 | SLAB_MEM_SPREAD|SLAB_ACCOUNT), | 97 | SLAB_MEM_SPREAD|SLAB_ACCOUNT), |
98 | init_once); | 98 | init_once); |
99 | if (isofs_inode_cachep == NULL) | 99 | if (!isofs_inode_cachep) |
100 | return -ENOMEM; | 100 | return -ENOMEM; |
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
@@ -678,7 +678,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent) | |||
678 | if (isonum_711(vdp->type) == ISO_VD_END) | 678 | if (isonum_711(vdp->type) == ISO_VD_END) |
679 | break; | 679 | break; |
680 | if (isonum_711(vdp->type) == ISO_VD_PRIMARY) { | 680 | if (isonum_711(vdp->type) == ISO_VD_PRIMARY) { |
681 | if (pri == NULL) { | 681 | if (!pri) { |
682 | pri = (struct iso_primary_descriptor *)vdp; | 682 | pri = (struct iso_primary_descriptor *)vdp; |
683 | /* Save the buffer in case we need it ... */ | 683 | /* Save the buffer in case we need it ... */ |
684 | pri_bh = bh; | 684 | pri_bh = bh; |
@@ -742,7 +742,7 @@ root_found: | |||
742 | goto out_freebh; | 742 | goto out_freebh; |
743 | } | 743 | } |
744 | 744 | ||
745 | if (joliet_level && (pri == NULL || !opt.rock)) { | 745 | if (joliet_level && (!pri || !opt.rock)) { |
746 | /* This is the case of Joliet with the norock mount flag. | 746 | /* This is the case of Joliet with the norock mount flag. |
747 | * A disc with both Joliet and Rock Ridge is handled later | 747 | * A disc with both Joliet and Rock Ridge is handled later |
748 | */ | 748 | */ |
@@ -1298,7 +1298,7 @@ static int isofs_read_inode(struct inode *inode, int relocated) | |||
1298 | unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); | 1298 | unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); |
1299 | unsigned long block; | 1299 | unsigned long block; |
1300 | int high_sierra = sbi->s_high_sierra; | 1300 | int high_sierra = sbi->s_high_sierra; |
1301 | struct buffer_head *bh = NULL; | 1301 | struct buffer_head *bh; |
1302 | struct iso_directory_record *de; | 1302 | struct iso_directory_record *de; |
1303 | struct iso_directory_record *tmpde = NULL; | 1303 | struct iso_directory_record *tmpde = NULL; |
1304 | unsigned int de_len; | 1304 | unsigned int de_len; |
@@ -1320,8 +1320,7 @@ static int isofs_read_inode(struct inode *inode, int relocated) | |||
1320 | int frag1 = bufsize - offset; | 1320 | int frag1 = bufsize - offset; |
1321 | 1321 | ||
1322 | tmpde = kmalloc(de_len, GFP_KERNEL); | 1322 | tmpde = kmalloc(de_len, GFP_KERNEL); |
1323 | if (tmpde == NULL) { | 1323 | if (!tmpde) { |
1324 | printk(KERN_INFO "%s: out of memory\n", __func__); | ||
1325 | ret = -ENOMEM; | 1324 | ret = -ENOMEM; |
1326 | goto fail; | 1325 | goto fail; |
1327 | } | 1326 | } |
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 2430a0415995..cba328315929 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -133,7 +133,7 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark) | |||
133 | kmem_cache_free(dnotify_mark_cache, dn_mark); | 133 | kmem_cache_free(dnotify_mark_cache, dn_mark); |
134 | } | 134 | } |
135 | 135 | ||
136 | static struct fsnotify_ops dnotify_fsnotify_ops = { | 136 | static const struct fsnotify_ops dnotify_fsnotify_ops = { |
137 | .handle_event = dnotify_handle_event, | 137 | .handle_event = dnotify_handle_event, |
138 | .free_mark = dnotify_free_mark, | 138 | .free_mark = dnotify_free_mark, |
139 | }; | 139 | }; |
diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c index ca71bf881ad1..2259329616b7 100644 --- a/fs/quota/quota_v2.c +++ b/fs/quota/quota_v2.c | |||
@@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type) | |||
109 | return -1; | 109 | return -1; |
110 | } | 110 | } |
111 | info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS); | 111 | info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS); |
112 | if (!info->dqi_priv) { | 112 | if (!info->dqi_priv) |
113 | printk(KERN_WARNING | ||
114 | "Not enough memory for quota information structure.\n"); | ||
115 | return -ENOMEM; | 113 | return -ENOMEM; |
116 | } | 114 | |
117 | qinfo = info->dqi_priv; | 115 | qinfo = info->dqi_priv; |
118 | if (version == 0) { | 116 | if (version == 0) { |
119 | /* limits are stored as unsigned 32-bit data */ | 117 | /* limits are stored as unsigned 32-bit data */ |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index a11d773e5ff3..0c882a0e2a6e 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -1481,7 +1481,7 @@ static int flush_journal_list(struct super_block *s, | |||
1481 | if ((!was_jwait) && !buffer_locked(saved_bh)) { | 1481 | if ((!was_jwait) && !buffer_locked(saved_bh)) { |
1482 | reiserfs_warning(s, "journal-813", | 1482 | reiserfs_warning(s, "journal-813", |
1483 | "BAD! buffer %llu %cdirty %cjwait, " | 1483 | "BAD! buffer %llu %cdirty %cjwait, " |
1484 | "not in a newer tranasction", | 1484 | "not in a newer transaction", |
1485 | (unsigned long long)saved_bh-> | 1485 | (unsigned long long)saved_bh-> |
1486 | b_blocknr, was_dirty ? ' ' : '!', | 1486 | b_blocknr, was_dirty ? ' ' : '!', |
1487 | was_jwait ? ' ' : '!'); | 1487 | was_jwait ? ' ' : '!'); |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 18fdb9d90812..8dacf4f57414 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -114,7 +114,7 @@ static void udf_update_extent_cache(struct inode *inode, loff_t estart, | |||
114 | __udf_clear_extent_cache(inode); | 114 | __udf_clear_extent_cache(inode); |
115 | if (pos->bh) | 115 | if (pos->bh) |
116 | get_bh(pos->bh); | 116 | get_bh(pos->bh); |
117 | memcpy(&iinfo->cached_extent.epos, pos, sizeof(struct extent_position)); | 117 | memcpy(&iinfo->cached_extent.epos, pos, sizeof(*pos)); |
118 | iinfo->cached_extent.lstart = estart; | 118 | iinfo->cached_extent.lstart = estart; |
119 | switch (iinfo->i_alloc_type) { | 119 | switch (iinfo->i_alloc_type) { |
120 | case ICBTAG_FLAG_AD_SHORT: | 120 | case ICBTAG_FLAG_AD_SHORT: |
@@ -1572,13 +1572,8 @@ static int udf_alloc_i_data(struct inode *inode, size_t size) | |||
1572 | { | 1572 | { |
1573 | struct udf_inode_info *iinfo = UDF_I(inode); | 1573 | struct udf_inode_info *iinfo = UDF_I(inode); |
1574 | iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL); | 1574 | iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL); |
1575 | 1575 | if (!iinfo->i_ext.i_data) | |
1576 | if (!iinfo->i_ext.i_data) { | ||
1577 | udf_err(inode->i_sb, "(ino %ld) no free memory\n", | ||
1578 | inode->i_ino); | ||
1579 | return -ENOMEM; | 1576 | return -ENOMEM; |
1580 | } | ||
1581 | |||
1582 | return 0; | 1577 | return 0; |
1583 | } | 1578 | } |
1584 | 1579 | ||
@@ -1703,7 +1698,7 @@ static int udf_update_inode(struct inode *inode, int do_sync) | |||
1703 | dsea->impUseLength = cpu_to_le32(sizeof(struct regid)); | 1698 | dsea->impUseLength = cpu_to_le32(sizeof(struct regid)); |
1704 | } | 1699 | } |
1705 | eid = (struct regid *)dsea->impUse; | 1700 | eid = (struct regid *)dsea->impUse; |
1706 | memset(eid, 0, sizeof(struct regid)); | 1701 | memset(eid, 0, sizeof(*eid)); |
1707 | strcpy(eid->ident, UDF_ID_DEVELOPER); | 1702 | strcpy(eid->ident, UDF_ID_DEVELOPER); |
1708 | eid->identSuffix[0] = UDF_OS_CLASS_UNIX; | 1703 | eid->identSuffix[0] = UDF_OS_CLASS_UNIX; |
1709 | eid->identSuffix[1] = UDF_OS_ID_LINUX; | 1704 | eid->identSuffix[1] = UDF_OS_ID_LINUX; |
@@ -1754,7 +1749,7 @@ static int udf_update_inode(struct inode *inode, int do_sync) | |||
1754 | udf_time_to_disk_stamp(&efe->createTime, iinfo->i_crtime); | 1749 | udf_time_to_disk_stamp(&efe->createTime, iinfo->i_crtime); |
1755 | udf_time_to_disk_stamp(&efe->attrTime, inode->i_ctime); | 1750 | udf_time_to_disk_stamp(&efe->attrTime, inode->i_ctime); |
1756 | 1751 | ||
1757 | memset(&(efe->impIdent), 0, sizeof(struct regid)); | 1752 | memset(&(efe->impIdent), 0, sizeof(efe->impIdent)); |
1758 | strcpy(efe->impIdent.ident, UDF_ID_DEVELOPER); | 1753 | strcpy(efe->impIdent.ident, UDF_ID_DEVELOPER); |
1759 | efe->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; | 1754 | efe->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; |
1760 | efe->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; | 1755 | efe->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; |
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 385ee89d5824..885198dfd9f8 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
@@ -1184,7 +1184,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1184 | */ | 1184 | */ |
1185 | ncfi.fileVersionNum = ocfi.fileVersionNum; | 1185 | ncfi.fileVersionNum = ocfi.fileVersionNum; |
1186 | ncfi.fileCharacteristics = ocfi.fileCharacteristics; | 1186 | ncfi.fileCharacteristics = ocfi.fileCharacteristics; |
1187 | memcpy(&(ncfi.icb), &(ocfi.icb), sizeof(struct long_ad)); | 1187 | memcpy(&(ncfi.icb), &(ocfi.icb), sizeof(ocfi.icb)); |
1188 | udf_write_fi(new_dir, &ncfi, nfi, &nfibh, NULL, NULL); | 1188 | udf_write_fi(new_dir, &ncfi, nfi, &nfibh, NULL, NULL); |
1189 | 1189 | ||
1190 | /* The old fid may have moved - find it again */ | 1190 | /* The old fid may have moved - find it again */ |
diff --git a/fs/udf/super.c b/fs/udf/super.c index 462ac2e9258c..93c59630512b 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -266,11 +266,8 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count) | |||
266 | { | 266 | { |
267 | struct udf_sb_info *sbi = UDF_SB(sb); | 267 | struct udf_sb_info *sbi = UDF_SB(sb); |
268 | 268 | ||
269 | sbi->s_partmaps = kcalloc(count, sizeof(struct udf_part_map), | 269 | sbi->s_partmaps = kcalloc(count, sizeof(*sbi->s_partmaps), GFP_KERNEL); |
270 | GFP_KERNEL); | ||
271 | if (!sbi->s_partmaps) { | 270 | if (!sbi->s_partmaps) { |
272 | udf_err(sb, "Unable to allocate space for %d partition maps\n", | ||
273 | count); | ||
274 | sbi->s_partitions = 0; | 271 | sbi->s_partitions = 0; |
275 | return -ENOMEM; | 272 | return -ENOMEM; |
276 | } | 273 | } |
@@ -324,7 +321,8 @@ static void udf_sb_free_partitions(struct super_block *sb) | |||
324 | { | 321 | { |
325 | struct udf_sb_info *sbi = UDF_SB(sb); | 322 | struct udf_sb_info *sbi = UDF_SB(sb); |
326 | int i; | 323 | int i; |
327 | if (sbi->s_partmaps == NULL) | 324 | |
325 | if (!sbi->s_partmaps) | ||
328 | return; | 326 | return; |
329 | for (i = 0; i < sbi->s_partitions; i++) | 327 | for (i = 0; i < sbi->s_partitions; i++) |
330 | udf_free_partition(&sbi->s_partmaps[i]); | 328 | udf_free_partition(&sbi->s_partmaps[i]); |
@@ -1071,7 +1069,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index) | |||
1071 | else | 1069 | else |
1072 | bitmap = vzalloc(size); /* TODO: get rid of vzalloc */ | 1070 | bitmap = vzalloc(size); /* TODO: get rid of vzalloc */ |
1073 | 1071 | ||
1074 | if (bitmap == NULL) | 1072 | if (!bitmap) |
1075 | return NULL; | 1073 | return NULL; |
1076 | 1074 | ||
1077 | bitmap->s_nr_groups = nr_groups; | 1075 | bitmap->s_nr_groups = nr_groups; |
@@ -2099,7 +2097,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) | |||
2099 | uopt.fmode = UDF_INVALID_MODE; | 2097 | uopt.fmode = UDF_INVALID_MODE; |
2100 | uopt.dmode = UDF_INVALID_MODE; | 2098 | uopt.dmode = UDF_INVALID_MODE; |
2101 | 2099 | ||
2102 | sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL); | 2100 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); |
2103 | if (!sbi) | 2101 | if (!sbi) |
2104 | return -ENOMEM; | 2102 | return -ENOMEM; |
2105 | 2103 | ||
diff --git a/include/uapi/linux/quota.h b/include/uapi/linux/quota.h index 4d2489ef6f10..f17c9636a859 100644 --- a/include/uapi/linux/quota.h +++ b/include/uapi/linux/quota.h | |||
@@ -33,7 +33,6 @@ | |||
33 | #ifndef _UAPI_LINUX_QUOTA_ | 33 | #ifndef _UAPI_LINUX_QUOTA_ |
34 | #define _UAPI_LINUX_QUOTA_ | 34 | #define _UAPI_LINUX_QUOTA_ |
35 | 35 | ||
36 | #include <linux/errno.h> | ||
37 | #include <linux/types.h> | 36 | #include <linux/types.h> |
38 | 37 | ||
39 | #define __DQUOT_VERSION__ "dquot_6.6.0" | 38 | #define __DQUOT_VERSION__ "dquot_6.6.0" |