Skip to contentSkip to conversation

sync_file_range: delete dead S_ISLNK code

PATCH Applied Alexey Dobriyan 3 participants 3 messages May 5 – May 12 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sync_file_range: delete dead S_ISLNK code

Symlinks can't appear as opened file.

---

 fs/sync.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/sync.c +1 -2
@@ -266,8 +266,7 @@ int sync_file_range(struct file *file, loff_t offset, loff_t nbytes,
 
 	i_mode = file_inode(file)->i_mode;
 	ret = -ESPIPE;
-	if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) &&
-			!S_ISLNK(i_mode))
+	if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode))
 		goto out;
 
 	mapping = file->f_mapping;
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Alexey Dobriyan

Symlinks can't appear as opened file.

Looks good. Feel free to add:

Honza

Quoted 17 lines

---

 fs/sync.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/sync.c +1 -2
@@ -266,8 +266,7 @@ int sync_file_range(struct file *file, loff_t offset, loff_t nbytes,
 
 	i_mode = file_inode(file)->i_mode;
 	ret = -ESPIPE;
-	if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) &&
-			!S_ISLNK(i_mode))
+	if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode))
 		goto out;
 
 	mapping = file->f_mapping;
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer Applied
#2 lore raw
In reply to Alexey Dobriyan
Quoted 1 line · Alexey Dobriyan

Symlinks can't appear as opened file.

Applied to the vfs-7.2.misc branch of the vfs/vfs.git tree. Patches in the vfs-7.2.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.2.misc

[1/1] sync_file_range: delete dead S_ISLNK code

      https://git.kernel.org/vfs/vfs/c/a38e953240d2