@@ -838,10 +838,6 @@ static ssize_t sel_read_bool(struct file *filep, char __user *buf,
838
838
839
839
ret = - EFAULT ;
840
840
841
- /* check to see if this file has been deleted */
842
- if (!filep -> f_op )
843
- goto out ;
844
-
845
841
if (count > PAGE_SIZE ) {
846
842
ret = - EINVAL ;
847
843
goto out ;
@@ -882,10 +878,6 @@ static ssize_t sel_write_bool(struct file *filep, const char __user *buf,
882
878
if (length )
883
879
goto out ;
884
880
885
- /* check to see if this file has been deleted */
886
- if (!filep -> f_op )
887
- goto out ;
888
-
889
881
if (count >= PAGE_SIZE ) {
890
882
length = - ENOMEM ;
891
883
goto out ;
@@ -940,10 +932,6 @@ static ssize_t sel_commit_bools_write(struct file *filep,
940
932
if (length )
941
933
goto out ;
942
934
943
- /* check to see if this file has been deleted */
944
- if (!filep -> f_op )
945
- goto out ;
946
-
947
935
if (count >= PAGE_SIZE ) {
948
936
length = - ENOMEM ;
949
937
goto out ;
@@ -982,11 +970,9 @@ static const struct file_operations sel_commit_bools_ops = {
982
970
.write = sel_commit_bools_write ,
983
971
};
984
972
985
- /* partial revoke() from fs/proc/generic.c proc_kill_inodes */
986
973
static void sel_remove_entries (struct dentry * de )
987
974
{
988
- struct list_head * p , * node ;
989
- struct super_block * sb = de -> d_sb ;
975
+ struct list_head * node ;
990
976
991
977
spin_lock (& dcache_lock );
992
978
node = de -> d_subdirs .next ;
@@ -1006,18 +992,6 @@ static void sel_remove_entries(struct dentry *de)
1006
992
}
1007
993
1008
994
spin_unlock (& dcache_lock );
1009
-
1010
- file_list_lock ();
1011
- list_for_each (p , & sb -> s_files ) {
1012
- struct file * filp = list_entry (p , struct file , f_u .fu_list );
1013
- struct dentry * dentry = filp -> f_path .dentry ;
1014
-
1015
- if (dentry -> d_parent != de ) {
1016
- continue ;
1017
- }
1018
- filp -> f_op = NULL ;
1019
- }
1020
- file_list_unlock ();
1021
995
}
1022
996
1023
997
#define BOOL_DIR_NAME "booleans"
0 commit comments