Where is the problem?
* fget atomically reads the pointer with the descriptor "fd" and
increases the reference count within "file".
* fput decreases that reference count, and if the count is 0, then it
closes the file.
* frip atomically replaces "fd" with NULL. close() then decreases the
ref count, and only if the ref count becomes 0, then file is really
closed.
-- Manfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/