]> mj.ucw.cz Git - libucw.git/commitdiff
Reverted the locking back to original unsafe (but in a harmless way) version,
authorMartin Mares <mj@ucw.cz>
Sat, 17 Jan 2004 23:20:02 +0000 (23:20 +0000)
committerMartin Mares <mj@ucw.cz>
Sat, 17 Jan 2004 23:20:02 +0000 (23:20 +0000)
because write locking of files opened for reading is not permitted.

lib/bucket.c

index ec672da322eac65bc66c8a71dcff988dcdd5369f..3516e85126eaa3b0d914245b0cc3dbcc940d236d 100644 (file)
@@ -297,11 +297,8 @@ obuck_fetch(void)
 oid_t
 obuck_predict_last_oid(void)
 {
-  obuck_lock_write();
   sh_off_t size = sh_seek(obuck_fd, 0, SEEK_END);
-  oid_t ss = size >> OBUCK_SHIFT;
-  obuck_unlock();
-  return ss;
+  return (oid_t)(size >> OBUCK_SHIFT);
 }
 
 struct fastbuf *