Commit 30304aba6a053f114092cea6643a96ac2902bc5a

Authored by Al Viro
1 parent c35eebe993

switch sysv

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 2 changed files with 4 additions and 5 deletions Side-by-side Diff

... ... @@ -48,7 +48,6 @@
48 48 struct inode * inode = NULL;
49 49 ino_t ino;
50 50  
51   - d_set_d_op(dentry, dir->i_sb->s_root->d_op);
52 51 if (dentry->d_name.len > SYSV_NAMELEN)
53 52 return ERR_PTR(-ENAMETOOLONG);
54 53 ino = sysv_inode_by_name(dentry);
... ... @@ -332,6 +332,10 @@
332 332 sb->s_magic = SYSV_MAGIC_BASE + sbi->s_type;
333 333 /* set up enough so that it can read an inode */
334 334 sb->s_op = &sysv_sops;
  335 + if (sbi->s_forced_ro)
  336 + sb->s_flags |= MS_RDONLY;
  337 + if (sbi->s_truncate)
  338 + sb->s_d_op = &sysv_dentry_operations;
335 339 root_inode = sysv_iget(sb, SYSV_ROOT_INO);
336 340 if (IS_ERR(root_inode)) {
337 341 printk("SysV FS: get root inode failed\n");
... ... @@ -343,10 +347,6 @@
343 347 printk("SysV FS: get root dentry failed\n");
344 348 return 0;
345 349 }
346   - if (sbi->s_forced_ro)
347   - sb->s_flags |= MS_RDONLY;
348   - if (sbi->s_truncate)
349   - d_set_d_op(sb->s_root, &sysv_dentry_operations);
350 350 return 1;
351 351 }
352 352