On 8 May 2000, Trond Myklebust wrote:
> >>>>> " " == Tigran Aivazian <firstname.lastname@example.org> writes:
> > mnt = list_entry(sb->s_mounts, struct vfsmount,
> > mnt_instances);
> > then it won't compile because of "cannot convert to a pointer
> > type" error.
> That's because s_mounts is the list head. If it is empty, then
> s_mounts.next == s_mounts.prev == &s_mounts
> if not then s_mounts.next points to the first mount instance.
> i.e. you need something like
> if (!list_empty(&sb->s_mounts))
> mnt = list_entry(sb->s_mounts.next, struct vfsmount, mnt_instances);
Thanks, this worked!
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:11 EST