]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: file_lock_try_update() comment updated.
authorTimo Sirainen <tss@iki.fi>
Sun, 24 May 2015 17:40:46 +0000 (13:40 -0400)
committerTimo Sirainen <tss@iki.fi>
Sun, 24 May 2015 17:40:46 +0000 (13:40 -0400)
It should possibly be removed entirely from the API.

src/lib/file-lock.h

index 189c162136d787a2e7dbae14da7014c847663989..6e8a1572a817cea04d00b1c8c5ee289c684d3c1c 100644 (file)
@@ -42,7 +42,8 @@ int file_wait_lock_error(int fd, const char *path, int lock_type,
                         enum file_lock_method lock_method,
                         unsigned int timeout_secs,
                         struct file_lock **lock_r, const char **error_r);
-/* Change the lock type. */
+/* Change the lock type. WARNING: This isn't an atomic operation!
+   The result is the same as file_unlock() + file_try_lock(). */
 int file_lock_try_update(struct file_lock *lock, int lock_type);
 
 /* Unlock and free the lock. */