Re: [PATCH] cifs: remove the retry in cifs_poxis_lock_set

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

 



Ping...

在 2020/6/24 15:10, yangerkun 写道:
The caller of cifs_posix_lock_set will do retry(like
fcntl_setlk64->do_lock_file_wait) if we will wait for any file_lock.
So the retry in cifs_poxis_lock_set seems duplicated, remove it to
make a cleanup.

Signed-off-by: yangerkun <yangerkun@xxxxxxxxxx>
---
  fs/cifs/file.c | 8 --------
  1 file changed, 8 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 9b0f8f33f832..2c9c24b1805d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1162,7 +1162,6 @@ cifs_posix_lock_set(struct file *file, struct file_lock *flock)
  	if ((flock->fl_flags & FL_POSIX) == 0)
  		return rc;
-try_again:
  	cifs_down_write(&cinode->lock_sem);
  	if (!cinode->can_cache_brlcks) {
  		up_write(&cinode->lock_sem);
@@ -1171,13 +1170,6 @@ cifs_posix_lock_set(struct file *file, struct file_lock *flock)
rc = posix_lock_file(file, flock, NULL);
  	up_write(&cinode->lock_sem);
-	if (rc == FILE_LOCK_DEFERRED) {
-		rc = wait_event_interruptible(flock->fl_wait,
-					list_empty(&flock->fl_blocked_member));
-		if (!rc)
-			goto try_again;
-		locks_delete_block(flock);
-	}
  	return rc;
  }




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux