diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-27 16:42:56 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-27 16:42:56 +0100 |
commit | 442d207eb0b4e7047c4fedccd900c425e689d502 (patch) | |
tree | 2c23dc98fba6912417164ba65b258a9da1241ae1 /fs/ntfs/super.c | |
parent | 2fb21db2548fc8b196eb8d8425f05ee1965d5344 (diff) | |
download | linux-3.10-442d207eb0b4e7047c4fedccd900c425e689d502.tar.gz linux-3.10-442d207eb0b4e7047c4fedccd900c425e689d502.tar.bz2 linux-3.10-442d207eb0b4e7047c4fedccd900c425e689d502.zip |
NTFS: Use C99 style structure initialization after memory allocation where
possible (fs/ntfs/{attrib.c,index.c,super.c}). Thanks to Al Viro and
Pekka Enberg.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/super.c')
-rw-r--r-- | fs/ntfs/super.c | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 8e50aa929f1..455cbe0a629 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -2292,36 +2292,19 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) return -ENOMEM; } /* Initialize ntfs_volume structure. */ - memset(vol, 0, sizeof(ntfs_volume)); - vol->sb = sb; - vol->upcase = NULL; - vol->attrdef = NULL; - vol->mft_ino = NULL; - vol->mftbmp_ino = NULL; + *vol = (ntfs_volume) { + .sb = sb, + /* + * Default is group and other don't have any access to files or + * directories while owner has full access. Further, files by + * default are not executable but directories are of course + * browseable. + */ + .fmask = 0177, + .dmask = 0077, + }; init_rwsem(&vol->mftbmp_lock); -#ifdef NTFS_RW - vol->mftmirr_ino = NULL; - vol->logfile_ino = NULL; -#endif /* NTFS_RW */ - vol->lcnbmp_ino = NULL; init_rwsem(&vol->lcnbmp_lock); - vol->vol_ino = NULL; - vol->root_ino = NULL; - vol->secure_ino = NULL; - vol->extend_ino = NULL; -#ifdef NTFS_RW - vol->quota_ino = NULL; - vol->quota_q_ino = NULL; -#endif /* NTFS_RW */ - vol->nls_map = NULL; - - /* - * Default is group and other don't have any access to files or - * directories while owner has full access. Further, files by default - * are not executable but directories are of course browseable. - */ - vol->fmask = 0177; - vol->dmask = 0077; unlock_kernel(); |