• Patrick Mochel's avatar
    sysfs: fix BUG()s on directory creation and removal. · c4bd2bfe
    Patrick Mochel authored
    - Don't d_delete() files when removing a directory - they must still be 
      hashed when dput() reaps them, and it will __d_drop() them anyway.
    
    - Don't d_invalidate() the directory on removal. 
    
    - do simple_rmdir() after d_delete() on directory. 
    
    - Remove extra dput(), which was causing refcount to go negative, causing 
      an oops when someone tried to create the directory again.
    
    - Make sure we don't d_delete() or do extra dput() on file when updating, 
      either.
    c4bd2bfe
inode.c 2.43 KB