Skip to content

Commit 460352c

Browse files
committed
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
2 parents 74fee4e + c9ea9df commit 460352c

File tree

9 files changed

+28
-35
lines changed

9 files changed

+28
-35
lines changed

MAINTAINERS

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4136,7 +4136,9 @@ F: include/linux/dax.h
41364136
F: include/trace/events/fs_dax.h
41374137

41384138
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
41404142
S: Maintained
41414143
F: Documentation/filesystems/dnotify.txt
41424144
F: fs/notify/dnotify/
@@ -5247,7 +5249,9 @@ F: Documentation/hwmon/f71805f
52475249
F: drivers/hwmon/f71805f.c
52485250

52495251
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
52515255
S: Maintained
52525256
F: fs/notify/fanotify/
52535257
F: include/linux/fanotify.h
@@ -6757,9 +6761,9 @@ S: Maintained
67576761
F: drivers/mtd/nand/jz4780_*
67586762

67596763
INOTIFY
6760-
M: John McCutchan <john@johnmccutchan.com>
6761-
M: Robert Love <rlove@rlove.org>
6762-
M: Eric Paris <eparis@parisplace.org>
6764+
M: Jan Kara <jack@suse.cz>
6765+
R: Amir Goldstein <amir73il@gmail.com>
6766+
L: linux-fsdevel@vger.kernel.org
67636767
S: Maintained
67646768
F: Documentation/filesystems/inotify.txt
67656769
F: fs/notify/inotify/

fs/isofs/inode.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int __init init_inodecache(void)
9696
0, (SLAB_RECLAIM_ACCOUNT|
9797
SLAB_MEM_SPREAD|SLAB_ACCOUNT),
9898
init_once);
99-
if (isofs_inode_cachep == NULL)
99+
if (!isofs_inode_cachep)
100100
return -ENOMEM;
101101
return 0;
102102
}
@@ -678,7 +678,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
678678
if (isonum_711(vdp->type) == ISO_VD_END)
679679
break;
680680
if (isonum_711(vdp->type) == ISO_VD_PRIMARY) {
681-
if (pri == NULL) {
681+
if (!pri) {
682682
pri = (struct iso_primary_descriptor *)vdp;
683683
/* Save the buffer in case we need it ... */
684684
pri_bh = bh;
@@ -742,7 +742,7 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
742742
goto out_freebh;
743743
}
744744

745-
if (joliet_level && (pri == NULL || !opt.rock)) {
745+
if (joliet_level && (!pri || !opt.rock)) {
746746
/* This is the case of Joliet with the norock mount flag.
747747
* A disc with both Joliet and Rock Ridge is handled later
748748
*/
@@ -1298,7 +1298,7 @@ static int isofs_read_inode(struct inode *inode, int relocated)
12981298
unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
12991299
unsigned long block;
13001300
int high_sierra = sbi->s_high_sierra;
1301-
struct buffer_head *bh = NULL;
1301+
struct buffer_head *bh;
13021302
struct iso_directory_record *de;
13031303
struct iso_directory_record *tmpde = NULL;
13041304
unsigned int de_len;
@@ -1320,8 +1320,7 @@ static int isofs_read_inode(struct inode *inode, int relocated)
13201320
int frag1 = bufsize - offset;
13211321

13221322
tmpde = kmalloc(de_len, GFP_KERNEL);
1323-
if (tmpde == NULL) {
1324-
printk(KERN_INFO "%s: out of memory\n", __func__);
1323+
if (!tmpde) {
13251324
ret = -ENOMEM;
13261325
goto fail;
13271326
}

fs/notify/dnotify/dnotify.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)
133133
kmem_cache_free(dnotify_mark_cache, dn_mark);
134134
}
135135

136-
static struct fsnotify_ops dnotify_fsnotify_ops = {
136+
static const struct fsnotify_ops dnotify_fsnotify_ops = {
137137
.handle_event = dnotify_handle_event,
138138
.free_mark = dnotify_free_mark,
139139
};

fs/quota/quota_v2.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type)
109109
return -1;
110110
}
111111
info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS);
112-
if (!info->dqi_priv) {
113-
printk(KERN_WARNING
114-
"Not enough memory for quota information structure.\n");
112+
if (!info->dqi_priv)
115113
return -ENOMEM;
116-
}
114+
117115
qinfo = info->dqi_priv;
118116
if (version == 0) {
119117
/* limits are stored as unsigned 32-bit data */

fs/reiserfs/journal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ static int flush_journal_list(struct super_block *s,
14811481
if ((!was_jwait) && !buffer_locked(saved_bh)) {
14821482
reiserfs_warning(s, "journal-813",
14831483
"BAD! buffer %llu %cdirty %cjwait, "
1484-
"not in a newer tranasction",
1484+
"not in a newer transaction",
14851485
(unsigned long long)saved_bh->
14861486
b_blocknr, was_dirty ? ' ' : '!',
14871487
was_jwait ? ' ' : '!');

fs/udf/inode.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static void udf_update_extent_cache(struct inode *inode, loff_t estart,
114114
__udf_clear_extent_cache(inode);
115115
if (pos->bh)
116116
get_bh(pos->bh);
117-
memcpy(&iinfo->cached_extent.epos, pos, sizeof(struct extent_position));
117+
memcpy(&iinfo->cached_extent.epos, pos, sizeof(*pos));
118118
iinfo->cached_extent.lstart = estart;
119119
switch (iinfo->i_alloc_type) {
120120
case ICBTAG_FLAG_AD_SHORT:
@@ -1572,13 +1572,8 @@ static int udf_alloc_i_data(struct inode *inode, size_t size)
15721572
{
15731573
struct udf_inode_info *iinfo = UDF_I(inode);
15741574
iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL);
1575-
1576-
if (!iinfo->i_ext.i_data) {
1577-
udf_err(inode->i_sb, "(ino %ld) no free memory\n",
1578-
inode->i_ino);
1575+
if (!iinfo->i_ext.i_data)
15791576
return -ENOMEM;
1580-
}
1581-
15821577
return 0;
15831578
}
15841579

@@ -1703,7 +1698,7 @@ static int udf_update_inode(struct inode *inode, int do_sync)
17031698
dsea->impUseLength = cpu_to_le32(sizeof(struct regid));
17041699
}
17051700
eid = (struct regid *)dsea->impUse;
1706-
memset(eid, 0, sizeof(struct regid));
1701+
memset(eid, 0, sizeof(*eid));
17071702
strcpy(eid->ident, UDF_ID_DEVELOPER);
17081703
eid->identSuffix[0] = UDF_OS_CLASS_UNIX;
17091704
eid->identSuffix[1] = UDF_OS_ID_LINUX;
@@ -1754,7 +1749,7 @@ static int udf_update_inode(struct inode *inode, int do_sync)
17541749
udf_time_to_disk_stamp(&efe->createTime, iinfo->i_crtime);
17551750
udf_time_to_disk_stamp(&efe->attrTime, inode->i_ctime);
17561751

1757-
memset(&(efe->impIdent), 0, sizeof(struct regid));
1752+
memset(&(efe->impIdent), 0, sizeof(efe->impIdent));
17581753
strcpy(efe->impIdent.ident, UDF_ID_DEVELOPER);
17591754
efe->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX;
17601755
efe->impIdent.identSuffix[1] = UDF_OS_ID_LINUX;

fs/udf/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry,
11841184
*/
11851185
ncfi.fileVersionNum = ocfi.fileVersionNum;
11861186
ncfi.fileCharacteristics = ocfi.fileCharacteristics;
1187-
memcpy(&(ncfi.icb), &(ocfi.icb), sizeof(struct long_ad));
1187+
memcpy(&(ncfi.icb), &(ocfi.icb), sizeof(ocfi.icb));
11881188
udf_write_fi(new_dir, &ncfi, nfi, &nfibh, NULL, NULL);
11891189

11901190
/* The old fid may have moved - find it again */

fs/udf/super.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,8 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count)
266266
{
267267
struct udf_sb_info *sbi = UDF_SB(sb);
268268

269-
sbi->s_partmaps = kcalloc(count, sizeof(struct udf_part_map),
270-
GFP_KERNEL);
269+
sbi->s_partmaps = kcalloc(count, sizeof(*sbi->s_partmaps), GFP_KERNEL);
271270
if (!sbi->s_partmaps) {
272-
udf_err(sb, "Unable to allocate space for %d partition maps\n",
273-
count);
274271
sbi->s_partitions = 0;
275272
return -ENOMEM;
276273
}
@@ -324,7 +321,8 @@ static void udf_sb_free_partitions(struct super_block *sb)
324321
{
325322
struct udf_sb_info *sbi = UDF_SB(sb);
326323
int i;
327-
if (sbi->s_partmaps == NULL)
324+
325+
if (!sbi->s_partmaps)
328326
return;
329327
for (i = 0; i < sbi->s_partitions; i++)
330328
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)
10711069
else
10721070
bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
10731071

1074-
if (bitmap == NULL)
1072+
if (!bitmap)
10751073
return NULL;
10761074

10771075
bitmap->s_nr_groups = nr_groups;
@@ -2099,7 +2097,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
20992097
uopt.fmode = UDF_INVALID_MODE;
21002098
uopt.dmode = UDF_INVALID_MODE;
21012099

2102-
sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL);
2100+
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
21032101
if (!sbi)
21042102
return -ENOMEM;
21052103

include/uapi/linux/quota.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#ifndef _UAPI_LINUX_QUOTA_
3434
#define _UAPI_LINUX_QUOTA_
3535

36-
#include <linux/errno.h>
3736
#include <linux/types.h>
3837

3938
#define __DQUOT_VERSION__ "dquot_6.6.0"

0 commit comments

Comments
 (0)