John Ogness wrote:
Probably a good (and efficient) fix would be to have check_recursion() set a "removed" flag in the process structure. That way, open_file() could very easily see if it has been removed or not. In my opinion, that is much better than relying on the return value of dentry_open().Rather than: ec->file = dentry_open(dget(evt->dentry), mntget(evt->mnt), O_RDONLY | O_LARGEFILE, current_cred()); if (IS_ERR(ec->file)) { check_recursion(); /* remove myself from proc_list */ ret = PTR_ERR(ec->file); goto error_out2; } the code could look like this: ec->file = dentry_open(dget(evt->dentry), mntget(evt->mnt), O_RDONLY | O_LARGEFILE, current_cred()); if (!proc.removed) check_recursion(); /* remove myself from proc_list */ if (IS_ERR(ec->file)) { ret = PTR_ERR(ec->file); goto error_out2; } John Ogness
And what about the solution I suggested to avoid the whole recursion thing (by simply passing _lower_ dentry and mount to dazukofs_open()). Do you (or someone else) see any problems with that? Geschäftsführender Gesellschafter: Tjark Auerbach Sitz der Gesellschaft: Tettnang Handelsregister: Amtsgericht Ulm, HRB 630992 ALLGEMEINE GESCHÄFTSBEDINGUNGEN Es gelten unsere Allgemeinen Geschäftsbedingungen (AGB). Sie finden sie in der jeweils gültigen Fassung im Internet unter http://www.avira.de/agb *************************************************** _______________________________________________ Dazuko-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/dazuko-devel
