How to tell whether a struct file is held by a process?

From: Alan Stern
Date: Tue May 19 2009 - 12:57:29 EST


What's the best way to tell whether the current process has a
particular struct file among its open files? Is there any better way
to find out than blindly calling fget() for each possible fd?

Is this a totally insane thing to do?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/