All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove redundant close_ref function
@ 2014-04-08 21:17 Ronnie Sahlberg
  2014-04-08 21:17 ` [PATCH] Remove the " Ronnie Sahlberg
  2014-04-08 21:32 ` [PATCH] Remove redundant " Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Ronnie Sahlberg @ 2014-04-08 21:17 UTC (permalink / raw)
  To: git


List,

This is a trivial patch that removes the function close_ref() from refs.c.
This function was only called from two codepaths and can be removed since both codepaths shortly afterwards
both call unlock_ref() which implicitely closes the file anyway.

By removing this function we simplify the api to refs slightly.
This also means that the lifetime of the filedescriptor becomes the same as the lifetime for the 'struct ref_lock' object.
The filedescriptor is opened at the same time ref_lock is allocated and the descriptor is closed when ref_lock is released.


regards
ronnie sahlberg

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-08 22:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 21:17 [PATCH] Remove redundant close_ref function Ronnie Sahlberg
2014-04-08 21:17 ` [PATCH] Remove the " Ronnie Sahlberg
2014-04-08 21:50   ` Junio C Hamano
2014-04-08 22:23     ` Ronnie Sahlberg
2014-04-08 21:32 ` [PATCH] Remove redundant " Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.