diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-27 11:42:56 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-27 11:42:56 -0400 |
commit | 442d207eb0b4e7047c4fedccd900c425e689d502 (patch) | |
tree | 2c23dc98fba6912417164ba65b258a9da1241ae1 /fs/ntfs/super.c | |
parent | 2fb21db2548fc8b196eb8d8425f05ee1965d5344 (diff) |
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 8e50aa929f1c..455cbe0a6296 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) | |||
2292 | return -ENOMEM; | 2292 | return -ENOMEM; |
2293 | } | 2293 | } |
2294 | /* Initialize ntfs_volume structure. */ | 2294 | /* Initialize ntfs_volume structure. */ |
2295 | memset(vol, 0, sizeof(ntfs_volume)); | 2295 | *vol = (ntfs_volume) { |
2296 | vol->sb = sb; | 2296 | .sb = sb, |
2297 | vol->upcase = NULL; | 2297 | /* |
2298 | vol->attrdef = NULL; | 2298 | * Default is group and other don't have any access to files or |
2299 | vol->mft_ino = NULL; | 2299 | * directories while owner has full access. Further, files by |
2300 | vol->mftbmp_ino = NULL; | 2300 | * default are not executable but directories are of course |
2301 | * browseable. | ||
2302 | */ | ||
2303 | .fmask = 0177, | ||
2304 | .dmask = 0077, | ||
2305 | }; | ||
2301 | init_rwsem(&vol->mftbmp_lock); | 2306 | init_rwsem(&vol->mftbmp_lock); |
2302 | #ifdef NTFS_RW | ||
2303 | vol->mftmirr_ino = NULL; | ||
2304 | vol->logfile_ino = NULL; | ||
2305 | #endif /* NTFS_RW */ | ||
2306 | vol->lcnbmp_ino = NULL; | ||
2307 | init_rwsem(&vol->lcnbmp_lock); | 2307 | init_rwsem(&vol->lcnbmp_lock); |
2308 | vol->vol_ino = NULL; | ||
2309 | vol->root_ino = NULL; | ||
2310 | vol->secure_ino = NULL; | ||
2311 | vol->extend_ino = NULL; | ||
2312 | #ifdef NTFS_RW | ||
2313 | vol->quota_ino = NULL; | ||
2314 | vol->quota_q_ino = NULL; | ||
2315 | #endif /* NTFS_RW */ | ||
2316 | vol->nls_map = NULL; | ||
2317 | |||
2318 | /* | ||
2319 | * Default is group and other don't have any access to files or | ||
2320 | * directories while owner has full access. Further, files by default | ||
2321 | * are not executable but directories are of course browseable. | ||
2322 | */ | ||
2323 | vol->fmask = 0177; | ||
2324 | vol->dmask = 0077; | ||
2325 | 2308 | ||
2326 | unlock_kernel(); | 2309 | unlock_kernel(); |
2327 | 2310 | ||