fs/ntfs: remove unused varibles

We actually don't use these varibles, so remove them to avoid gcc warning:

  fs/ntfs/file.c:326:14: warning: variable `base_ni' set but not used [-Wunused-but-set-variable]
  fs/ntfs/logfile.c:481:21: warning: variable `log_page_mask' set but not used [-Wunused-but-set-variable]

Link: https://lkml.kernel.org/r/1604821092-54631-1-git-send-email-alex.shi@linux.alibaba.com
Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Acked-by: Anton Altaparmakov <anton@tuxera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alex Shi 2020-12-14 19:03:31 -08:00 committed by Linus Torvalds
parent ec680c1990
commit 3f10c2fa40
2 changed files with 2 additions and 6 deletions

View File

@ -323,7 +323,7 @@ static ssize_t ntfs_prepare_file_for_write(struct kiocb *iocb,
unsigned long flags; unsigned long flags;
struct file *file = iocb->ki_filp; struct file *file = iocb->ki_filp;
struct inode *vi = file_inode(file); struct inode *vi = file_inode(file);
ntfs_inode *base_ni, *ni = NTFS_I(vi); ntfs_inode *ni = NTFS_I(vi);
ntfs_volume *vol = ni->vol; ntfs_volume *vol = ni->vol;
ntfs_debug("Entering for i_ino 0x%lx, attribute type 0x%x, pos " ntfs_debug("Entering for i_ino 0x%lx, attribute type 0x%x, pos "
@ -365,9 +365,6 @@ static ssize_t ntfs_prepare_file_for_write(struct kiocb *iocb,
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
goto out; goto out;
} }
base_ni = ni;
if (NInoAttr(ni))
base_ni = ni->ext.base_ntfs_ino;
err = file_remove_privs(file); err = file_remove_privs(file);
if (unlikely(err)) if (unlikely(err))
goto out; goto out;

View File

@ -478,7 +478,7 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp)
u8 *kaddr = NULL; u8 *kaddr = NULL;
RESTART_PAGE_HEADER *rstr1_ph = NULL; RESTART_PAGE_HEADER *rstr1_ph = NULL;
RESTART_PAGE_HEADER *rstr2_ph = NULL; RESTART_PAGE_HEADER *rstr2_ph = NULL;
int log_page_size, log_page_mask, err; int log_page_size, err;
bool logfile_is_empty = true; bool logfile_is_empty = true;
u8 log_page_bits; u8 log_page_bits;
@ -501,7 +501,6 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp)
log_page_size = DefaultLogPageSize; log_page_size = DefaultLogPageSize;
else else
log_page_size = PAGE_SIZE; log_page_size = PAGE_SIZE;
log_page_mask = log_page_size - 1;
/* /*
* Use ntfs_ffs() instead of ffs() to enable the compiler to * Use ntfs_ffs() instead of ffs() to enable the compiler to
* optimize log_page_size and log_page_bits into constants. * optimize log_page_size and log_page_bits into constants.