• Deepa Dinamani's avatar
    fs: cifs: replace CURRENT_TIME by other appropriate apis · e37fea58
    Deepa Dinamani authored
    CURRENT_TIME macro is not y2038 safe on 32 bit systems.
    
    The patch replaces all the uses of CURRENT_TIME by current_time() for
    filesystem times, and ktime_get_* functions for authentication
    timestamps and timezone calculations.
    
    This is also in preparation for the patch that transitions vfs
    timestamps to use 64 bit time and hence make them y2038 safe.
    
    CURRENT_TIME macro will be deleted before merging the aforementioned
    change.
    
    The inode timestamps read from the server are assumed to have correct
    granularity and range.
    
    The patch also assumes that the difference between server and client
    times lie in the range INT_MIN..INT_MAX.  This is valid because this is
    the difference between current times between server and client, and the
    largest timezone difference is in the range of one day.
    
    All cifs timestamps currently use timespec representation internally.
    Authentication and timezone timestamps can also be transitioned into
    using timespec64 when all other timestamps for cifs is transitioned to
    use timespec64.
    
    Link: http://lkml.kernel.org/r/1491613030-11599-4-git-send-email-deepa.kernel@gmail.comSigned-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
    Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
    Cc: Steve French <sfrench@samba.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e37fea58
cifsencrypt.c 24.8 KB