[PATCH] libmount: do not check for EAGAIN after flock()

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

 



As per flock() manpage, flock() does not set errno=EAGAIN.

Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx>
---
 shlibs/mount/src/tab_update.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/shlibs/mount/src/tab_update.c b/shlibs/mount/src/tab_update.c
index 2084b58..a0f99f1 100644
--- a/shlibs/mount/src/tab_update.c
+++ b/shlibs/mount/src/tab_update.c
@@ -619,7 +619,7 @@ static int utab_lock(const char *filename)
 
 	while (flock(fd, LOCK_EX) < 0) {
 		int errsv;
-		if ((errno == EAGAIN) || (errno == EINTR))
+		if (errno == EINTR)
 			continue;
 		errsv = errno;
 		close(fd);
-- 
1.7.1


Petr

--
Petr Uzel
IRC: ptr_uzl @ freenode

Attachment: pgpSwRGJddQCY.pgp
Description: PGP signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux