fs: add ksys_fchmod() and do_fchmodat() helpers and ksys_chmod() wrapper; remove...
[linux-block.git] / include / linux / syscalls.h
index 827ed917630cab98cb96540d1a29932572a4943b..dd6c306f4f00e1ae4b4b1a210f99d55201412673 100644 (file)
@@ -953,6 +953,7 @@ int ksys_dup(unsigned int fildes);
 int ksys_chroot(const char __user *filename);
 ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
 int ksys_chdir(const char __user *filename);
+int ksys_fchmod(unsigned int fd, umode_t mode);
 
 /*
  * The following kernel syscall equivalents are just wrappers to fs-internal
@@ -1006,4 +1007,11 @@ static inline long ksys_link(const char __user *oldname,
        return do_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
 }
 
+extern int do_fchmodat(int dfd, const char __user *filename, umode_t mode);
+
+static inline int ksys_chmod(const char __user *filename, umode_t mode)
+{
+       return do_fchmodat(AT_FDCWD, filename, mode);
+}
+
 #endif