Patch "exec: Remove reset_files_struct" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    exec: Remove reset_files_struct

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     exec-remove-reset_files_struct.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0fc2aacbb7358e72bfc95f2fc74ff5c6b5ebd7c3
Author: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Date:   Fri Nov 20 17:14:20 2020 -0600

    exec: Remove reset_files_struct
    
    [ Upstream commit 950db38ff2c01b7aabbd7ab4a50b7992750fa63d ]
    
    Now that exec no longer needs to restore the previous value of current->files
    on error there are no more callers of reset_files_struct so remove it.
    
    Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx>
    v1: https://lkml.kernel.org/r/20200817220425.9389-3-ebiederm@xxxxxxxxxxxx
    Link: https://lkml.kernel.org/r/20201120231441.29911-3-ebiederm@xxxxxxxxxxxx
    Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
    Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/file.c b/fs/file.c
index d6bc73960e4ac..5065252bb474e 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -466,18 +466,6 @@ void put_files_struct(struct files_struct *files)
 	}
 }
 
-void reset_files_struct(struct files_struct *files)
-{
-	struct task_struct *tsk = current;
-	struct files_struct *old;
-
-	old = tsk->files;
-	task_lock(tsk);
-	tsk->files = files;
-	task_unlock(tsk);
-	put_files_struct(old);
-}
-
 void exit_files(struct task_struct *tsk)
 {
 	struct files_struct * files = tsk->files;
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index b32ab2163dc2d..c0ca6fb3f0f95 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -108,7 +108,6 @@ struct task_struct;
 
 struct files_struct *get_files_struct(struct task_struct *);
 void put_files_struct(struct files_struct *fs);
-void reset_files_struct(struct files_struct *);
 int unshare_files(void);
 struct files_struct *dup_fd(struct files_struct *, unsigned, int *) __latent_entropy;
 void do_close_on_exec(struct files_struct *);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux