@@ -527,13 +527,14 @@ EXPORT_SYMBOL_GPL(kernfs_find_and_get_ns);
527527
528528/**
529529 * kernfs_create_root - create a new kernfs hierarchy
530- * @kdops : optional directory syscall operations for the hierarchy
530+ * @scops : optional syscall operations for the hierarchy
531531 * @priv: opaque data associated with the new directory
532532 *
533533 * Returns the root of the new hierarchy on success, ERR_PTR() value on
534534 * failure.
535535 */
536- struct kernfs_root * kernfs_create_root (struct kernfs_dir_ops * kdops , void * priv )
536+ struct kernfs_root * kernfs_create_root (struct kernfs_syscall_ops * scops ,
537+ void * priv )
537538{
538539 struct kernfs_root * root ;
539540 struct kernfs_node * kn ;
@@ -556,7 +557,7 @@ struct kernfs_root *kernfs_create_root(struct kernfs_dir_ops *kdops, void *priv)
556557 kn -> priv = priv ;
557558 kn -> dir .root = root ;
558559
559- root -> dir_ops = kdops ;
560+ root -> syscall_ops = scops ;
560561 root -> kn = kn ;
561562 init_waitqueue_head (& root -> deactivate_waitq );
562563
@@ -653,16 +654,16 @@ static int kernfs_iop_mkdir(struct inode *dir, struct dentry *dentry,
653654 umode_t mode )
654655{
655656 struct kernfs_node * parent = dir -> i_private ;
656- struct kernfs_dir_ops * kdops = kernfs_root (parent )-> dir_ops ;
657+ struct kernfs_syscall_ops * scops = kernfs_root (parent )-> syscall_ops ;
657658 int ret ;
658659
659- if (!kdops || !kdops -> mkdir )
660+ if (!scops || !scops -> mkdir )
660661 return - EPERM ;
661662
662663 if (!kernfs_get_active (parent ))
663664 return - ENODEV ;
664665
665- ret = kdops -> mkdir (parent , dentry -> d_name .name , mode );
666+ ret = scops -> mkdir (parent , dentry -> d_name .name , mode );
666667
667668 kernfs_put_active (parent );
668669 return ret ;
@@ -671,16 +672,16 @@ static int kernfs_iop_mkdir(struct inode *dir, struct dentry *dentry,
671672static int kernfs_iop_rmdir (struct inode * dir , struct dentry * dentry )
672673{
673674 struct kernfs_node * kn = dentry -> d_fsdata ;
674- struct kernfs_dir_ops * kdops = kernfs_root (kn )-> dir_ops ;
675+ struct kernfs_syscall_ops * scops = kernfs_root (kn )-> syscall_ops ;
675676 int ret ;
676677
677- if (!kdops || !kdops -> rmdir )
678+ if (!scops || !scops -> rmdir )
678679 return - EPERM ;
679680
680681 if (!kernfs_get_active (kn ))
681682 return - ENODEV ;
682683
683- ret = kdops -> rmdir (kn );
684+ ret = scops -> rmdir (kn );
684685
685686 kernfs_put_active (kn );
686687 return ret ;
@@ -691,10 +692,10 @@ static int kernfs_iop_rename(struct inode *old_dir, struct dentry *old_dentry,
691692{
692693 struct kernfs_node * kn = old_dentry -> d_fsdata ;
693694 struct kernfs_node * new_parent = new_dir -> i_private ;
694- struct kernfs_dir_ops * kdops = kernfs_root (kn )-> dir_ops ;
695+ struct kernfs_syscall_ops * scops = kernfs_root (kn )-> syscall_ops ;
695696 int ret ;
696697
697- if (!kdops || !kdops -> rename )
698+ if (!scops || !scops -> rename )
698699 return - EPERM ;
699700
700701 if (!kernfs_get_active (kn ))
@@ -705,7 +706,7 @@ static int kernfs_iop_rename(struct inode *old_dir, struct dentry *old_dentry,
705706 return - ENODEV ;
706707 }
707708
708- ret = kdops -> rename (kn , new_parent , new_dentry -> d_name .name );
709+ ret = scops -> rename (kn , new_parent , new_dentry -> d_name .name );
709710
710711 kernfs_put_active (new_parent );
711712 kernfs_put_active (kn );
0 commit comments