Thread (60 messages) 60 messages, 4 authors, 2019-01-31

Re: [PATCH 08/18] fs: add fget_many() and fput_many()

flat view

From: Christoph Hellwig <hch@lst.de>
Date: 2019-01-28 14:29:32
Also in: linux-fsdevel

quoted hunk ↗ jump to hunk
+struct file *fget_many(unsigned int fd, unsigned int refs)
+{
+	return __fget(fd, FMODE_PATH, refs);
+}
+
 struct file *fget(unsigned int fd)
 {
-	return __fget(fd, FMODE_PATH);
+	return fget_many(fd, 1);
I'd still prefer removing the double indirection in this call, but
I know you disagree.
quoted hunk ↗ jump to hunk
 }
 EXPORT_SYMBOL(fget);
 
 struct file *fget_raw(unsigned int fd)
 {
-	return __fget(fd, 0);
+	return __fget(fd, 0, 1);
 }
 EXPORT_SYMBOL(fget_raw);
Especially as we already avoid it here..

Otherwise looks fine to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help