Re: [PATCH 3/9] VFS: Introduce a mount context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joe Perches <joe@xxxxxxxxxxx> wrote:

> krealloc would probably be more efficient and possible
> readable as likely there's already padding in the original
> allocation.

The problem is if krealloc() fails: you've lost all those pointers to things
you then need to free.

> Are there no locking constraints?

Generally, no, not until you do the ->mount() op.  Also remounting needs a
lock, but that's already done with the sb->s_umount lock.

However, that said, if you do:

	fd = fsopen("foofs");
	write(fd, "o foo=bar", ...);
	fsmount(fd, "/foo");

then the fsmount() and write() calls have to lock against other fsmount() and
write() calls.  I use the inode lock for this.  [Note that it probably should
be interruptible rather than just killable, but there's no primitive for that
as yet].

David
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux